diff options
author | Rasmus Steinke <rasi@xssn.at> | 2014-11-02 11:16:18 +0100 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2014-11-02 11:16:18 +0100 |
commit | d18ff13031c3e9f0af44abdd5888d72a1b028b7d (patch) | |
tree | 0d8310e42383aed741a0592626a2d54f215693f2 | |
parent | 8e9b77bd534ee60e93b5315016d4b42c8d859294 (diff) | |
download | perl-app-clerk-d18ff13031c3e9f0af44abdd5888d72a1b028b7d.tar.gz perl-app-clerk-d18ff13031c3e9f0af44abdd5888d72a1b028b7d.tar.xz |
use pid file for mpd-sima
-rwxr-xr-x | clerk | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -344,11 +344,11 @@ export status="$(mpc status)" } mpdSima () { - if pgrep -lf mpd_sima; then - kill $(pgrep -lf mpd_sima | awk '{ print $1 }') + if [[ -a /tmp/mpd-sima.pid ]]; then + kill $(cat /tmp/mpd_sima.pid) sleep 1 else - mpd-sima -d + mpd-sima -d -p /tmp/mpd-sima.pid sleep 1 fi } |