Skip to content

Commit

Permalink
restore status command in displaycameras script
Browse files Browse the repository at this point in the history
also remove "echo" as a command option in usage string
  • Loading branch information
Anonymousdog authored Jun 3, 2018
1 parent caf02e9 commit ea54ae1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion displaycameras
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,18 @@ done
echo $DISPLAY_SEQUENCE > $DISPLAY_SEQUENCE_FILE
;;

status)
for i in "${camera_names[@]}"
do
status="`omxplayer_dbuscontrol $i status 2>/dev/null`"
if [[ "$status" != "Playing"* ]]; then
echo "$i is NOT playing"
else
echo "$i is $status"
fi
done
;;

positions)
for i in "${camera_names[@]}"
do
Expand All @@ -321,7 +333,7 @@ done
;;

*)
echo "Usage: /usr/bin/displaycameras {start|stop|restart|repair|status|positions|echo|rotate|rotaterev}"
echo "Usage: /usr/bin/displaycameras {start|stop|restart|repair|status|positions|rotate|rotaterev}"
exit 1
;;
esac

0 comments on commit ea54ae1

Please sign in to comment.