mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-18 05:34:20 +01:00
@@ -6,15 +6,16 @@
|
||||
"url": "https://home-assistant.io/addons/dnsmasq/",
|
||||
"startup": "before",
|
||||
"boot": "auto",
|
||||
"host_network": true,
|
||||
"ports": {
|
||||
"53/udp": 53,
|
||||
"53/tcp": 53
|
||||
},
|
||||
"options": {
|
||||
"interface": "eth0",
|
||||
"defaults": ["8.8.8.8", "8.8.4.4"],
|
||||
"forwards": [],
|
||||
"hosts": []
|
||||
},
|
||||
"schema": {
|
||||
"interface": "str",
|
||||
"defaults": ["str"],
|
||||
"forwards": [
|
||||
{
|
||||
|
||||
@@ -6,10 +6,6 @@ CONFIG_PATH=/data/options.json
|
||||
DEFAULTS=$(jq --raw-output '.defaults[]' $CONFIG_PATH)
|
||||
FORWARDS=$(jq --raw-output '.forwards | length' $CONFIG_PATH)
|
||||
HOSTS=$(jq --raw-output '.hosts | length' $CONFIG_PATH)
|
||||
INTERFACE=$(jq --raw-output '.interface | length' $CONFIG_PATH)
|
||||
|
||||
# Set interface
|
||||
echo "interface=$INTERFACE" >> /etc/dnsmasq.conf
|
||||
|
||||
# Add default forward servers
|
||||
for line in $DEFAULTS; do
|
||||
|
||||
Reference in New Issue
Block a user