From b03003f401d4eb5cdfeebc21cd19f8a906dd17d4 Mon Sep 17 00:00:00 2001 From: pants Date: Mon, 9 Mar 2026 00:58:50 -0700 Subject: [PATCH] yep --- bin/mpd-monitor | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/bin/mpd-monitor b/bin/mpd-monitor index 7324c70..009c984 100755 --- a/bin/mpd-monitor +++ b/bin/mpd-monitor @@ -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