added missing quotes around variables
This commit is contained in:
parent
83bf70e67a
commit
8043247fe3
|
@ -12,9 +12,9 @@ lounge_light_toggle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
cd "$(dirname $0)"
|
cd "$(dirname $0)"
|
||||||
rm -f $COMMAND_FILE
|
rm -f "$COMMAND_FILE"
|
||||||
mkfifo $COMMAND_FILE
|
mkfifo "$COMMAND_FILE"
|
||||||
chmod 666 $COMMAND_FILE
|
chmod 666 "$COMMAND_FILE"
|
||||||
while true; do
|
while true; do
|
||||||
while IFS='' read -r line || [[ -n "$line" ]]; do
|
while IFS='' read -r line || [[ -n "$line" ]]; do
|
||||||
echo "command received: $line"
|
echo "command received: $line"
|
||||||
|
|
2
shell.sh
2
shell.sh
|
@ -6,7 +6,7 @@
|
||||||
# command="/home/automation/chch-power/shell.sh",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAA...
|
# command="/home/automation/chch-power/shell.sh",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa AAAA...
|
||||||
|
|
||||||
COMMAND_FILE=/tmp/command
|
COMMAND_FILE=/tmp/command
|
||||||
if [ ! -p $COMMAND_FILE ]; then
|
if [ ! -p "$COMMAND_FILE" ]; then
|
||||||
echo "ERROR; command watcher not listening:" >&2
|
echo "ERROR; command watcher not listening:" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue