summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2014-11-02 11:16:18 +0100
committerRasmus Steinke <rasi@xssn.at>2014-11-02 11:16:18 +0100
commitd18ff13031c3e9f0af44abdd5888d72a1b028b7d (patch)
tree0d8310e42383aed741a0592626a2d54f215693f2
parent8e9b77bd534ee60e93b5315016d4b42c8d859294 (diff)
downloadperl-app-clerk-d18ff13031c3e9f0af44abdd5888d72a1b028b7d.tar.gz
perl-app-clerk-d18ff13031c3e9f0af44abdd5888d72a1b028b7d.tar.xz
use pid file for mpd-sima
-rwxr-xr-xclerk6
1 files changed, 3 insertions, 3 deletions
diff --git a/clerk b/clerk
index 0600163..5eddd8f 100755
--- a/clerk
+++ b/clerk
@@ -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
}