24 lines
308 B
Plaintext
24 lines
308 B
Plaintext
|
#!/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
|