Poti sa pui scriptul pe zshare te rog? Pe rapidshare, la mine cel putin, nu pot vedea cele 4 caractere de test.
Am incercat m multe variante de script, dar imi tot da o eroare la final:
Sau pune exact cum e la tine. Ceva e aiurea.Syntax error: "done" unexpected (expecting "fi")
Am rulat pentru test cu comanda
sh -v test.sh
unde test.sh este:
Outputul este:#!/bin/sh
while [ 1 ]; do
process=`ps auxwww | grep /usr/bin/CCcam_2011 | grep -v grep | awk '{print $1}'`
if [ -z "$process" ]; then echo "Couldn't find CCcam running. Restarting server-binary" >> /tmp/cccam.check
/usr/bin/CCcam_2011
elif ! [ -z "$process" ]; then
echo "CCcam is still OK!" >> /dev/null
fi
done
#!/bin/sh
while [ 1 ]; do
process=`ps auxwww | grep /usr/bin/CCcam_2011 | grep -v grep | awk '{print $1}'`
if [ -z "$process" ]; then echo "Couldn't find CCcam running. Restarting server-
binary" >> /tmp/cccam.check
/usr/bin/CCcam_2011
elif ! [ -z "$process" ]; then
echo "CCcam is still OK!" >> /dev/null
fi
done/usr/script/test.sh: 9: Syntax error: "done" unexpected (expecting "fi")


Thanks:
Likes:
Dislikes:
Reply With Quote
