Clear MPD state on non-0 exit from MPD song sensor
[khatus.git] / bin / khatus
index 8fd094f..bbc7ab8 100755 (executable)
@@ -49,6 +49,11 @@ run_producer() {
         do
             echo "OK ${msg_head} $line" > "$pipe"
         done
+    cmd_exit_code=${PIPESTATUS[0]}
+    if [ "$cmd_exit_code" -ne 0 ]
+    then
+        echo "ERROR ${msg_head} NON_ZERO_EXIT_CODE $cmd_exit_code" > "$pipe"
+    fi
 }
 
 fork_watcher() {
This page took 0.026256 seconds and 4 git commands to generate.