aboutsummaryrefslogtreecommitdiff
path: root/net/kadnode/files
diff options
context:
space:
mode:
Diffstat (limited to 'net/kadnode/files')
-rwxr-xr-xnet/kadnode/files/kadnode.init13
1 files changed, 10 insertions, 3 deletions
diff --git a/net/kadnode/files/kadnode.init b/net/kadnode/files/kadnode.init
index 7dcd6be52..fb2ad509d 100755
--- a/net/kadnode/files/kadnode.init
+++ b/net/kadnode/files/kadnode.init
@@ -2,10 +2,17 @@
START=95
USE_PROCD=1
-KADNODE_BIN=/usr/bin/kadnode
+PROG=/usr/bin/kadnode
OPTS=""
+boot()
+{
+ # Wait for the loopback interface to be ready
+ ubus -t 30 wait_for network.interface network.loopback 2>/dev/null
+ rc_procd start_service
+}
+
xappend() {
local name="$2" value="$1"
OPTS="$OPTS--${name//_/-} ${value//'/\\'}
@@ -56,14 +63,14 @@ start_instance() {
append_opts_boolean "$cfg" dns_proxy_enable lpd_disable fwd_disable ipv4 ipv6
# Close stdin when cmd feature is present
- if [ $($KADNODE_BIN --version | grep -c cmd) -eq 1 ]; then
+ if [ $($PROG --version | grep -c cmd) -eq 1 ]; then
xappend "" "cmd_disable_stdin"
fi
echo "$OPTS" > $CONFIG_FILE
procd_open_instance
- procd_set_param command $KADNODE_BIN
+ procd_set_param command $PROG
procd_set_param file $CONFIG_FILE
procd_set_param stderr 1
procd_set_param stdout 1