procd: procd_send_signal use signal names
Usage documentation for 'procd_send_signal' states "The signal is SIGHUP by default, and must be specified by NAME." Make actual behaviour match the stated documented behaviour. https://wiki.openwrt.org/inbox/procd-init-scripts Suggested-by: Jo-Philip Wich <jow@mein.io> Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
This commit is contained in:
committed by
Jo-Philipp Wich
parent
3804f5743d
commit
37bb463daa
@@ -413,6 +413,10 @@ _procd_send_signal() {
|
||||
local instance="$2"
|
||||
local signal="$3"
|
||||
|
||||
case "$signal" in
|
||||
[A-Z]*) signal="$(kill -l "$signal" 2>/dev/null)" || return 1;;
|
||||
esac
|
||||
|
||||
json_init
|
||||
json_add_string name "$service"
|
||||
[ -n "$instance" -a "$instance" != "*" ] && json_add_string instance "$instance"
|
||||
|
||||
Reference in New Issue
Block a user