DNSMasq change to internal host (#182)

* Update run.sh

* Update config.json
This commit is contained in:
Pascal Vizeli
2017-09-26 21:35:25 +02:00
committed by GitHub
parent 54b8289e08
commit 6c84c8bbd9
2 changed files with 7 additions and 12 deletions

View File

@@ -1,17 +1,19 @@
{
"name": "Dnsmasq",
"version": "0.5",
"version": "1.0",
"slug": "dnsmasq",
"description": "A simple DNS server",
"url": "https://home-assistant.io/addons/dnsmasq/",
"startup": "system",
"boot": "auto",
"host_network": true,
"ports": {
"53/tcp": 53,
"53/udp": 53
},
"options": {
"defaults": ["8.8.8.8", "8.8.4.4"],
"forwards": [],
"hosts": [],
"interface": "eth0"
"hosts": []
},
"schema": {
"defaults": ["str"],
@@ -26,8 +28,7 @@
"host": "str",
"ip": "str"
}
],
"interface": "str"
]
},
"image": "homeassistant/{arch}-addon-dnsmasq"
}

View File

@@ -6,12 +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 // empty' $CONFIG_PATH)
# Bind to interface
if [ -z "$INTERFACE" ]; then
echo "interface=$INTERFACE" >> /etc/dnsmasq.conf
fi
# Add default forward servers
for line in $DEFAULTS; do