yep
This commit is contained in:
@@ -1,15 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# exit if another instance is already running
|
||||
#if [ !$(pidof mpd-monitor > /dev/null) ]; then
|
||||
# echo "mpd-monitor already running"
|
||||
# exit
|
||||
#fi
|
||||
|
||||
# this might actually work...
|
||||
RUNNING=$(pidof mpc > /dev/null)
|
||||
if [ !$RUNNING ]; then
|
||||
echo "mpd-monitor already running"
|
||||
PID=$(pgrep -x mpc)
|
||||
if [ -n "$PID" ]; then
|
||||
echo "another instance of mpd-monitor already running"
|
||||
exit
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user