mirror of
https://github.com/openwrt/packages.git
synced 2025-02-07 08:09:51 +00:00
In the absense of an address entry bind to all interfaces which is also iodined's default when -l isn't given. Signed-off-by: Uwe Kleine-König <uwe+openwrt@kleine-koenig.org>
28 lines
608 B
Bash
28 lines
608 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006-2011 OpenWrt.org
|
|
|
|
START=50
|
|
|
|
start_instance () {
|
|
local section="$1"
|
|
config_get address "$section" 'address'
|
|
config_get password "$section" 'password'
|
|
config_get tunnelip "$section" 'tunnelip'
|
|
config_get tld "$section" 'tld'
|
|
config_get port "$section" 'port'
|
|
|
|
test -n "$address" || address='0.0.0.0'
|
|
test -n "$port" || port='53'
|
|
|
|
service_start /usr/sbin/iodined -l "$address" -P "$password" -p "$port" "$tunnelip" "$tld"
|
|
}
|
|
|
|
start() {
|
|
config_load 'iodined'
|
|
config_foreach start_instance 'iodined'
|
|
}
|
|
|
|
stop() {
|
|
service_stop /usr/sbin/iodined
|
|
}
|