mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-12-24 16:57:53 +00:00
Merge pull request #368 from willeponken/add-reload-busybox-init
contrib/busybox-init: add reload and use -useconffile
This commit is contained in:
commit
81aed4244c
@ -34,8 +34,8 @@ start() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
printf 'Starting yggdrasil: '
|
printf 'Starting yggdrasil: '
|
||||||
if start-stop-daemon -S -b -x /usr/bin/yggdrasil \
|
if start-stop-daemon -S -q -b -x /usr/bin/yggdrasil \
|
||||||
-- --useconf < "$CONFFILE"; then
|
-- -useconffile "$CONFFILE"; then
|
||||||
echo "OK"
|
echo "OK"
|
||||||
else
|
else
|
||||||
echo "FAIL"
|
echo "FAIL"
|
||||||
@ -51,20 +51,26 @@ stop() {
|
|||||||
fi
|
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() {
|
restart() {
|
||||||
stop
|
stop
|
||||||
start
|
start
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
|
||||||
restart
|
|
||||||
}
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start|stop|restart|reload)
|
start|stop|restart|reload)
|
||||||
"$1";;
|
"$1";;
|
||||||
*)
|
*)
|
||||||
echo "Usage: $0 {start|stop|restart}"
|
echo "Usage: $0 {start|stop|restart|reload}"
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user