foodoord/foodoor

24 lines
308 B
Plaintext
Raw Normal View History

2014-10-29 18:33:36 +00:00
#!/bin/sh
set -e
PIPE_PATH=/var/run/foodoord.pipe
if [ ! -e $PIPE_PATH ]
then
echo "Pipe missing. Check daemon status."
exit 1
fi
case $1 in
close)
echo close > $PIPE_PATH
;;
open)
echo open > $PIPE_PATH
;;
*)
echo "Usage: $(basename $0) { close, open}"
exit 1
;;
esac