Use consistent method to kill process in s6 finish script
If the process does not exist, the error message of `kill` command is a little bit confusing: `kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]` Using `killall` in `/s6/debian-root/etc/services.d/pihole-FTL/finish` to kill the process, like what we do in `cron/finish` & `lighttpd/finish`, will make the usage in this project more consistent, and also, the command `killall` will provide better & friendly output, like: `pihole-FTL: no process found` Close #986, cc #973 Signed-off-by: Peter Dave Hello <hsu@peterdavehello.org>
This commit is contained in:
parent
0a20ef8955
commit
b29ac1ec18
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
s6-echo "Stopping pihole-FTL"
|
s6-echo "Stopping pihole-FTL"
|
||||||
kill -15 $(pgrep pihole-FTL)
|
killall -15 pihole-FTL
|
||||||
|
|
Loading…
Reference in New Issue