Commit dea963e9 authored by nextime's avatar nextime

Fix bash syntax error: remove 'local' keyword from script body

- 'local' can only be used inside functions, not in main script body
- Fixed both wssshd-watchdog and wssshc-watchdog scripts
- Removed 'local count=0' from start case handlers
parent 9932ff92
...@@ -247,7 +247,7 @@ case "$1" in ...@@ -247,7 +247,7 @@ case "$1" in
fi fi
main & main &
# Wait for PID file to be created (max 5 seconds) # Wait for PID file to be created (max 5 seconds)
local count=0 count=0
while [ $count -lt 10 ] && [ ! -f "$WATCHDOG_PID_FILE" ]; do while [ $count -lt 10 ] && [ ! -f "$WATCHDOG_PID_FILE" ]; do
sleep 0.5 sleep 0.5
count=$((count + 1)) count=$((count + 1))
......
...@@ -247,7 +247,7 @@ case "$1" in ...@@ -247,7 +247,7 @@ case "$1" in
fi fi
main & main &
# Wait for PID file to be created (max 5 seconds) # Wait for PID file to be created (max 5 seconds)
local count=0 count=0
while [ $count -lt 10 ] && [ ! -f "$WATCHDOG_PID_FILE" ]; do while [ $count -lt 10 ] && [ ! -f "$WATCHDOG_PID_FILE" ]; do
sleep 0.5 sleep 0.5
count=$((count + 1)) count=$((count + 1))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment