music-audit: fix the completion check that could never fire
pgrep -f music-identify matched the ssh command line carrying that very string, so the 'still running' branch was always true and the follow-up would wait for ever. Bracket the pattern (music-[i]dentify) so pgrep cannot match itself.
This commit is contained in:
1 parent
39fcf6bc4f
commit
1390fd8487
1 file changed
+1
-1
@@ -32,7 +32,7 @@ mkdir -p "$(dirname "$STATE")" "$(dirname "$LOG")"
|
||||
[ -f "$STATE" ] && exit 0
|
||||
|
||||
# Still working? (FORCE=1 skips this, for testing the report path)
|
||||
if [ "${FORCE:-0}" != "1" ] && ssh -o BatchMode=yes -o ConnectTimeout=10 "$SSH_HOST" 'pgrep -f music-identify >/dev/null' 2>/dev/null; then
|
||||
if [ "${FORCE:-0}" != "1" ] && ssh -o BatchMode=yes -o ConnectTimeout=10 "$SSH_HOST" 'pgrep -f "music-[i]dentify" >/dev/null' 2>/dev/null; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user