DM800: script to check if cccam is running
Script to check if cccam is running >>> DM 800
the script does not need crond to start and is very simple
cd /usr/bin
while [ 1 ];
do
process=`ps auxwww | grep cccamd-real | grep -v grep | awk '{print $1}'`
if [ -z "$process" ]; then
echo "Couldn't find CCcam running. Restarting server-binary" >> /tmp/cccam.check
/usr/bin/cccamd-real
else
echo "CCcam is still OK!" >> /dev/null
fi
done
to start the script you must do the following steps
1.
- go to usr/bin and rename your existing CCcam_2011 to cccamd-real
2.
- upload the file CCcam_2011 that is attached to this post to /usr/bin and set attributes to 755
3.
-reboot dreambox
download :
[Only registered and activated users can see links. Click Here To Register...]
Re: DM800: script to check if cccam is running
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:
Quote:
Syntax error: "done" unexpected (expecting "fi")
Sau pune exact cum e la tine. Ceva e aiurea.
Am rulat pentru test cu comanda
sh -v test.sh
unde test.sh este:
Quote:
#!/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
Outputul este:
Quote:
#!/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")
Re: DM800: script to check if cccam is running
zShare link [Only registered and activated users can see links. Click Here To Register...]
.