PDA

View Full Version : DM800: script to check if cccam is running



me1960
25-03-09, 11:14
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 :

http://rapidshare.de/files/46332440/onlinecheck_script_for_E2_DREAMBOX_800S_HD.rar.html

bibisor200
26-03-09, 20:09
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:

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:

#!/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:

#!/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")

delta2k2
26-03-09, 20:15
zShare link aici (http://www.zshare.net/download/577144383ebfd705/)

.