Quantcast
Channel: Tomato Firmware
Viewing all articles
Browse latest Browse all 5246

Semicolon and Scripts

$
0
0
Hi,

I'm trying to add this script to the init section of the event scripts "Advanced Tomato v3.5-140 AIO-64K"

Code:
while sleep 30; do
  for i in 1 2 3; do
    if ping -qc1 -w10 google.com > /dev/null 2>&1; then
      /sbin/gpio disable 3
      continue 2
    fi
  done
  logger "Can't ping gateway"
  /sbin/gpio enable 3
done
But the script does not save, If I removed the semicolons the script saves.

How should I resolve this.

Thanks

Viewing all articles
Browse latest Browse all 5246

Trending Articles