repo: music action: commit revision: path_from: revision_from: 45a59dd7666c856a9ea3a7e4bcedb7663f8660c7: path_to: revision_to:
commit 45a59dd7666c856a9ea3a7e4bcedb7663f8660c7 Author: epochDate: Fri Jan 15 05:15:28 2021 -0600 music-stop now uses SIGINT and sends it to children too diff --git a/music-stop b/music-stop
--- a/music-stop
+++ b/music-stop
@@ -5,12 +5,19 @@ file="${PREFIX}/run/music/init.pid"
if [ -f "$file" ];then
pid="$(cat "$file")"
rm -f "$file"
- kill -9 "$pid"
+ if [ "$(ps -h -o cmd -p "$pid")" = "qargs music-player" ];then
+ printf "found qargs music-player running with pid %d. killing.\n" "$pid" >&2
+ pkill -2 -P "$pid"
+ kill -2 "$pid"
+ else
+ printf "stale init.pid\n" >&2
+ fi
file="${PREFIX}/run/music/player.pid"
if [ -f "$file" ];then
pid="$(cat "$file")"
rm -f "$file"
- kill -9 "$pid"
+ pkill -2 -P "$pid"
+ kill -2 "$pid"
exit 0
fi
logger -n logserver "player.pid was missing."
-----END OF PAGE-----