ddns-scripts: fix daemon to reload instead of kill
authorPaul Donald <[email protected]>
Fri, 11 Apr 2025 14:27:14 +0000 (16:27 +0200)
committerFlorian Eckert <[email protected]>
Fri, 18 Apr 2025 16:06:14 +0000 (18:06 +0200)
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 <[email protected]>
net/ddns-scripts/files/etc/init.d/ddns
net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_updater.sh

index b2156a6a630032b4de53163c79324d2b4b36d609..7c82165201337ab374abd17cc02c359d1cadc622 100644 (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
index 4f599f6cbf892d0b9438cb3b33498cf8338b7e57..ffd7f2710cd1a8f08450de84073593a9251c5365 100644 (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 $?
                ;;