Commit 37bb463d authored by Kevin Darbyshire-Bryant's avatar Kevin Darbyshire-Bryant Committed by Jo-Philipp Wich
Browse files

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: default avatarJo-Philip Wich <jow@mein.io>
Signed-off-by: default avatarKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
parent 3804f574
......@@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=procd
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(LEDE_GIT)/project/procd.git
......
......@@ -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"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment