From f4ccbe6c94fa2a49e8b54392d42f5a1c7879cebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Wennerstr=C3=B6m?= Date: Wed, 6 Mar 2019 11:30:49 +0100 Subject: [PATCH] contrib/busybox-init: add reload and use -useconffile + Added reload command. + Use -useconffile instead, as it's required for reloading. --- contrib/busybox-init/S42yggdrasil | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/contrib/busybox-init/S42yggdrasil b/contrib/busybox-init/S42yggdrasil index d09c3a7..862efc2 100755 --- a/contrib/busybox-init/S42yggdrasil +++ b/contrib/busybox-init/S42yggdrasil @@ -34,8 +34,8 @@ start() { fi printf 'Starting yggdrasil: ' - if start-stop-daemon -S -b -x /usr/bin/yggdrasil \ - -- --useconf < "$CONFFILE"; then + if start-stop-daemon -S -q -b -x /usr/bin/yggdrasil \ + -- -useconffile "$CONFFILE"; then echo "OK" else echo "FAIL" @@ -51,20 +51,26 @@ stop() { fi } +reload() { + printf "Reloading yggdrasil: " + if start-stop-daemon -K -q -s HUP -x /usr/bin/yggdrasil; then + echo "OK" + else + echo "FAIL" + start + fi +} + restart() { stop start } -reload() { - restart -} - case "$1" in start|stop|restart|reload) "$1";; *) - echo "Usage: $0 {start|stop|restart}" + echo "Usage: $0 {start|stop|restart|reload}" exit 1 esac