mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 05:04:21 +01:00
DNSMasq change to internal host (#182)
* Update run.sh * Update config.json
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user