This script
#!/bin/sh
once=true
while $once do
stop & PID=$!
sleep 10M
if [$!=0]; then
start
break
else
kill $PID
fi
done
Gives
./restart.sh: line 18: syntax error near unexpected token `done'
./restart.sh: line 18: `done'
I don't understand, it had run previously on another unix system. Am i missing something?
EDIT
stop and start are functions that simply run stop.sh and start.sh respectively.