Merge pull request #99 from home-assistant/build

Build
This commit is contained in:
Pascal Vizeli
2017-05-25 00:35:21 +02:00
committed by GitHub
2 changed files with 7 additions and 3 deletions

View File

@@ -6,15 +6,15 @@
"url": "https://home-assistant.io/addons/dnsmasq/",
"startup": "before",
"boot": "auto",
"ports": {
"53/udp": 53
},
"host_network": true,
"options": {
"interface": "eth0",
"defaults": ["8.8.8.8", "8.8.4.4"],
"forwards": [],
"hosts": []
},
"schema": {
"interface": "str",
"defaults": ["str"],
"forwards": [
{

View File

@@ -6,6 +6,10 @@ CONFIG_PATH=/data/options.json
DEFAULTS=$(jq --raw-output '.domain' $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