From 8043247fe39c0fbe398447507e22671c7fc7e693 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 24 Feb 2017 19:49:14 +0000 Subject: [PATCH] added missing quotes around variables --- command_watcher.sh | 6 +++--- shell.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/command_watcher.sh b/command_watcher.sh index be7b352..341f454 100755 --- a/command_watcher.sh +++ b/command_watcher.sh @@ -12,9 +12,9 @@ lounge_light_toggle() { } cd "$(dirname $0)" -rm -f $COMMAND_FILE -mkfifo $COMMAND_FILE -chmod 666 $COMMAND_FILE +rm -f "$COMMAND_FILE" +mkfifo "$COMMAND_FILE" +chmod 666 "$COMMAND_FILE" while true; do while IFS='' read -r line || [[ -n "$line" ]]; do echo "command received: $line" diff --git a/shell.sh b/shell.sh index 129be89..a828f84 100755 --- a/shell.sh +++ b/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_FILE=/tmp/command -if [ ! -p $COMMAND_FILE ]; then +if [ ! -p "$COMMAND_FILE" ]; then echo "ERROR; command watcher not listening:" >&2 exit 1 fi