ddns-scripts: fix daemon to reload instead of kill

Instead of just killing all the processes, let's actually reload them,
since that's what the user would expect when issuing a 'reload' command.

Move the killall portion to a kill function

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
Paul Donald
2025-04-11 16:27:14 +02:00
committed by Florian Eckert
parent 081f1856a5
commit 9f3d6fed24
2 changed files with 8 additions and 4 deletions

View File

@@ -6,11 +6,15 @@ boot() {
return 0
}
reload() {
/usr/lib/ddns/dynamic_dns_updater.sh -- reload
kill() {
/usr/lib/ddns/dynamic_dns_updater.sh -- kill
return 0
}
reload() {
restart
}
restart() {
/usr/lib/ddns/dynamic_dns_updater.sh -- stop
sleep 1 # give time to shutdown

View File

@@ -23,7 +23,7 @@ Usage:
Commands:
start Start SECTION or NETWORK or all
stop Stop NETWORK or all
stop Stop SECTION or NETWORK or all
Parameters:
-n NETWORK Start/Stop sections in background monitoring NETWORK, force VERBOSE=0
@@ -92,7 +92,7 @@ case "$1" in
fi
exit 1
;;
reload)
kill)
killall dynamic_dns_updater.sh 2>/dev/null
exit $?
;;