foodoord/foodoor
2015-04-05 15:29:00 +02:00

24 lines
308 B
Bash
Executable File

#!/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