mirror of
https://github.com/openwrt/packages.git
synced 2025-12-10 12:41:22 +00:00
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:
committed by
Florian Eckert
parent
081f1856a5
commit
9f3d6fed24
@@ -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
|
||||
|
||||
@@ -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 $?
|
||||
;;
|
||||
|
||||
Reference in New Issue
Block a user