mirror of
https://github.com/aljazceru/addons.git
synced 2025-12-17 05:04:21 +01:00
This reverts commit 18c939c546.
This commit is contained in:
@@ -1,9 +1,5 @@
|
||||
# Changelog
|
||||
|
||||
## 1.4
|
||||
|
||||
- Adds support for srv-host records
|
||||
|
||||
## 1.3
|
||||
|
||||
- Rewrites add-on onto Bashio
|
||||
|
||||
@@ -32,12 +32,6 @@ forwards:
|
||||
hosts:
|
||||
- host: home.mydomain.io
|
||||
ip: 192.168.1.10
|
||||
services:
|
||||
- srv: _ldap._tcp.pdc._msdcs.mydomain.io
|
||||
host: dc.mydomain.io
|
||||
port: 389
|
||||
priority: 0
|
||||
weight: 100
|
||||
```
|
||||
|
||||
### Option: `defaults` (required)
|
||||
@@ -82,30 +76,6 @@ The hostname or domainname to resolve locally.
|
||||
|
||||
The IP address Dnsmasq should respond with in its DNS answer.
|
||||
|
||||
### Option: `services` (optional)
|
||||
|
||||
This option allows you to provide srv-host records.
|
||||
|
||||
#### Option: `services.srv`
|
||||
|
||||
The service to resolve.
|
||||
|
||||
#### Option: `services.host`
|
||||
|
||||
The host that contain the service.
|
||||
|
||||
#### Option: `services.port`
|
||||
|
||||
The port number for the service.
|
||||
|
||||
#### Option: `services.priority`
|
||||
|
||||
The priority for the service.
|
||||
|
||||
#### Option: `services.weight`
|
||||
|
||||
The weight for the service.
|
||||
|
||||
## Support
|
||||
|
||||
Got questions?
|
||||
|
||||
@@ -25,14 +25,6 @@ profile dnsmasq flags=(attach_disconnected,mediate_deleted) {
|
||||
/dev/tty rw,
|
||||
/tmp/* rw,
|
||||
|
||||
/etc/s6/** ix,
|
||||
/run/s6/** ix,
|
||||
/etc/services.d/** rwix,
|
||||
/etc/cont-init.d/** rwix,
|
||||
/etc/cont-finish.d/** rwix,
|
||||
|
||||
/run/** rwk,
|
||||
|
||||
/run.sh rix,
|
||||
/data/** r,
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Dnsmasq",
|
||||
"version": "1.4",
|
||||
"version": "1.3",
|
||||
"slug": "dnsmasq",
|
||||
"description": "A simple DNS server",
|
||||
"url": "https://github.com/home-assistant/hassio-addons/tree/master/dnsmasq",
|
||||
@@ -14,8 +14,7 @@
|
||||
"options": {
|
||||
"defaults": ["8.8.8.8", "8.8.4.4"],
|
||||
"forwards": [],
|
||||
"hosts": [],
|
||||
"services": []
|
||||
"hosts": []
|
||||
},
|
||||
"schema": {
|
||||
"defaults": ["str"],
|
||||
@@ -30,15 +29,6 @@
|
||||
"host": "str",
|
||||
"ip": "str"
|
||||
}
|
||||
],
|
||||
"services": [
|
||||
{
|
||||
"srv": "str",
|
||||
"host": "str",
|
||||
"port": "str",
|
||||
"priority": "int",
|
||||
"weight": "int"
|
||||
}
|
||||
]
|
||||
},
|
||||
"image": "homeassistant/{arch}-addon-dnsmasq"
|
||||
|
||||
@@ -5,12 +5,27 @@ CONFIG="/etc/dnsmasq.conf"
|
||||
|
||||
bashio::log.info "Configuring dnsmasq..."
|
||||
|
||||
tempio \
|
||||
-conf /data/options.json \
|
||||
-template /usr/share/tempio/dnsmasq.config \
|
||||
-out "${CONFIG}"
|
||||
# Add default forward servers
|
||||
for server in $(bashio::config 'defaults'); do
|
||||
echo "server=${server}" >> "${CONFIG}"
|
||||
done
|
||||
|
||||
# Create domain forwards
|
||||
for forward in $(bashio::config 'forwards|keys'); do
|
||||
DOMAIN=$(bashio::config "forwards[${forward}].domain")
|
||||
SERVER=$(bashio::config "forwards[${forward}].server")
|
||||
|
||||
echo "server=/${DOMAIN}/${SERVER}" >> "${CONFIG}"
|
||||
done
|
||||
|
||||
# Create static hosts
|
||||
for host in $(bashio::config 'hosts|keys'); do
|
||||
HOST=$(bashio::config "hosts[${host}].host")
|
||||
IP=$(bashio::config "hosts[${host}].ip")
|
||||
|
||||
echo "address=/${HOST}/${IP}" >> "${CONFIG}"
|
||||
done
|
||||
|
||||
# Run dnsmasq
|
||||
bashio::log.info "Starting dnsmasq..."
|
||||
exec dnsmasq -C "${CONFIG}" -z < /dev/null
|
||||
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Automatically generated do not edit
|
||||
|
||||
# Default forward servers
|
||||
{{ range .defaults }}
|
||||
server={{ . }}
|
||||
{{ end }}
|
||||
|
||||
# Domain forwards
|
||||
{{ range .forwards }}
|
||||
server=/{{ .domain }}/{{ .server }}
|
||||
{{ end }}
|
||||
|
||||
# Static hosts
|
||||
{{ range .hosts }}
|
||||
address=/{{ .host }}/{{ .ip }}
|
||||
{{ end }}
|
||||
|
||||
# Static srv-hosts
|
||||
{{ range .services }}
|
||||
srv-host={{ .srv }},{{ .host }},{{ .port }},{{ .priority }},{{ .weight }}
|
||||
{{ end }}
|
||||
|
||||
Reference in New Issue
Block a user