repo: music action: commit revision: path_from: revision_from: fb585204839db9b3b462fb03fedfd979b11fe1a9: path_to: revision_to:
commit fb585204839db9b3b462fb03fedfd979b11fe1a9 Author: epochDate: Thu Jul 30 08:21:57 2020 -0500 check that the pid exists before sending a STOP to whatever is inside it diff --git a/music-pause b/music-pause
--- a/music-pause
+++ b/music-pause
@@ -1,4 +1,6 @@
#!/bin/sh
-#exec pkill -STOP mpv
-logger -p info -n logserver 'music paused'
-exec kill -STOP $(cat ${PREFIX}/var/run/music-player.pid)
+if [ -f "${PREFIX}/run/music/player.pid" ];then
+ logger -p info -n logserver 'music paused'
+ exec kill -STOP "$(cat "${PREFIX}/run/music/player.pid")"
+fi
+logger -p info -n logserver 'MUSIC FAILED TO PAUSE. PID FILE MISSING.'
-----END OF PAGE-----