PDA

View Full Version : Multicas on hop 2



tx0
10-01-2010, 09:49 PM
Hello.

Multicas is not OK on hop 2 these days. Some may say 'What do you expect from hop 2 anyway'?.. I've made a watch script that should be started from cron every minute, it does some checks and restarts multicas if needed. Also it handles blue LED.

#!/bin/sh
PATH=/bin:/usr/bin:/MMP/usr/bin

#12000 is your server port

date=`date`

IFRUNMCAS=`cat /EMU/OpenXCAS/module.seq | grep -i ^MultiCAS | wc -l `
CONN=`netstat -an | grep '12000.*ESTABLISHED' | wc -l`
NOTVALID=`cat /tmp/ccc_ecm.info | tail -1 | grep ' 0.0' | wc -l`
NOTVALID2=`cat /tmp/ccc_ecm.info | grep 'Unable' | wc -l`


if [ "$CONN" -eq 1 ]
then
/MMP/usr/bin/vfd_display -td210 -led bon
fi

if [ "$IFRUNMCAS" -ne 0 ]
then


if [ "$NOTVALID" -eq 1 ] || [ "$NOTVALID2" -ne 0 ] || [ "$CONN" -eq 0 ]
then
/MMP/usr/bin/vfd_display -td210 -led boff
killall emu_module
sleep 2
/EMU/OpenXCAS/MultiCAS/emu_module &
fi

fi

killerno
10-01-2010, 10:22 PM
Hi,

Could you explain a little bit more?Where shall i put this script?How can i start?
Thank you!

hfmls
10-01-2010, 10:47 PM
sorry what does this do?

happyhammer
10-01-2010, 11:22 PM
sorry what does this do?

well i'm no programmer but is seems clear that it checks if multicas is working and getting valid ecm info. Unfortunately, it would seem to work only on one C: line, as it mentions only one port to check, 12000 in this case.

So if it sees ecm.info with 0.0 or "unable" in it, it says its not valid and restarts Multicas.

and for the premium, it puts the blue light on when multicas has connection to the server

kleinerjunge
11-01-2010, 12:08 AM
Hm,

"Unable" I get also when decryption is done via EMU (Softkeys)......
Restarting MultiCAS wouldn't be necessary in this case...

cu
KJ