mirror of
https://github.com/openwrt/packages.git
synced 2025-12-24 08:28:20 +04: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
|
start start given SECTION
|
||||||
reload force running ddns processes to reload changed configuration
|
reload force running ddns processes to reload changed configuration
|
||||||
restart restart all ddns processes
|
restart restart all ddns processes
|
||||||
|
stop stop given SECTION
|
||||||
|
|
||||||
Parameters:
|
Parameters:
|
||||||
-6 => use_ipv6=1 (default 0)
|
-6 => use_ipv6=1 (default 0)
|
||||||
@@ -39,7 +40,7 @@ Parameters:
|
|||||||
-s SCRIPT => ip_script=SCRIPT; ip_source="script"
|
-s SCRIPT => ip_script=SCRIPT; ip_source="script"
|
||||||
-t => force_dnstcp=1 (default 0)
|
-t => force_dnstcp=1 (default 0)
|
||||||
-u URL => ip_url=URL; ip_source="web"
|
-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
|
-h => show this help and exit
|
||||||
-L => use_logfile=1 (default 0)
|
-L => use_logfile=1 (default 0)
|
||||||
@@ -161,6 +162,15 @@ case "$1" in
|
|||||||
sleep 1
|
sleep 1
|
||||||
"$DDNSPRG" -- start
|
"$DDNSPRG" -- start
|
||||||
;;
|
;;
|
||||||
|
stop)
|
||||||
|
if [ -n "$SECTION" ]; then
|
||||||
|
# section stop
|
||||||
|
"$DDNSPRG" -S "$SECTION" -- stop
|
||||||
|
else
|
||||||
|
# global stop
|
||||||
|
"$DDNSPRG" -- stop
|
||||||
|
fi
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
__RET=255
|
__RET=255
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -79,7 +79,11 @@ case "$1" in
|
|||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
stop)
|
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"
|
stop_daemon_for_all_ddns_sections "$NETWORK"
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user