Hi, I try to activate a script that checks my Ccam and restart it if its dead.
I put the script in /cron/scripts and try to test it Cron Manager but only get:
syntax error on line 8: unexpected "fi" (expecting "then")
Here is my script:
#!/bin/sh
if ps x |grep -v grep |grep -c CCcam >/dev/null
then
echo "cccam... ok"
else
echo "cccam... restarting"
/usr/bin/cam/CCcam_2.3.0. &
fi
Im using TS Image 3.0 (latest august/september).
Please give me some help if you know more about the functions
(And yes the rights on the file is changed to 755.)
I put the script in /cron/scripts and try to test it Cron Manager but only get:
syntax error on line 8: unexpected "fi" (expecting "then")
Here is my script:
#!/bin/sh
if ps x |grep -v grep |grep -c CCcam >/dev/null
then
echo "cccam... ok"
else
echo "cccam... restarting"
/usr/bin/cam/CCcam_2.3.0. &
fi
Im using TS Image 3.0 (latest august/september).
Please give me some help if you know more about the functions
(And yes the rights on the file is changed to 755.)