mirror of
https://github.com/openwrt/packages.git
synced 2025-12-17 16:11:21 +00:00
ddns-scripts: add stop action for individual sections
it is now possible to stop an individual instance, and not all of them. Signed-off-by: Paul Donald <newtwen+github@gmail.com>
This commit is contained in:
committed by
Florian Eckert
parent
a361672882
commit
77933a45ea
@@ -26,6 +26,7 @@ Commands:
|
||||
start start given SECTION
|
||||
reload force running ddns processes to reload changed configuration
|
||||
restart restart all ddns processes
|
||||
stop stop given SECTION
|
||||
|
||||
Parameters:
|
||||
-6 => use_ipv6=1 (default 0)
|
||||
@@ -39,7 +40,7 @@ Parameters:
|
||||
-s SCRIPT => ip_script=SCRIPT; ip_source="script"
|
||||
-t => force_dnstcp=1 (default 0)
|
||||
-u URL => ip_url=URL; ip_source="web"
|
||||
-S SECTION SECTION to start
|
||||
-S SECTION SECTION to [start|stop]
|
||||
|
||||
-h => show this help and exit
|
||||
-L => use_logfile=1 (default 0)
|
||||
@@ -161,6 +162,15 @@ case "$1" in
|
||||
sleep 1
|
||||
"$DDNSPRG" -- start
|
||||
;;
|
||||
stop)
|
||||
if [ -n "$SECTION" ]; then
|
||||
# section stop
|
||||
"$DDNSPRG" -S "$SECTION" -- stop
|
||||
else
|
||||
# global stop
|
||||
"$DDNSPRG" -- stop
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
__RET=255
|
||||
;;
|
||||
|
||||
@@ -79,7 +79,11 @@ case "$1" in
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if [ -n "$INTERFACE" ]; then
|
||||
if [ -n "$SECTION_ID" ]; then
|
||||
stop_section_processes "$SECTION_ID"
|
||||
exit 0
|
||||
fi
|
||||
if [ -n "$NETWORK" ]; then
|
||||
stop_daemon_for_all_ddns_sections "$NETWORK"
|
||||
exit 0
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user