Problem with wiccard emu shell script

armsattt

Registered
Messages
2
Hello!

STB - Sezam Marvel
OS - Egami 8.0.6

I have problem with emu scripts on this exact device / firmware.

I tried Oscam Universal, wicardd 1.18 from Egami repos, wicardd 1.19 by RAED for Egami (which does not include shell emu script, only xml file, so i took shell script from 1.18 wicardd repos package, edited it replacing binary name with /usr/bin/wicardd19), wiccard 1.19 from repos is not installable simply shows message with errors.

So i stopped at wicardd 1.19 by RAED. I can't get any shell script to work with it, i place my config in /etc/tuxbox/config/wicardd and if i run from terminal wicardd19 -d -c /etc/tuxbox/config/wicardd - everything works fine, but i need to work it automaticaly. If i run it from softcam menu, i've got message "starting wiccard.. something" and nothing happens. So to figure out things i decided to run shell script located in /usr/emu-scripts/ from terminal and error "line X command not found" i have is always related to the last line of code containing "$0 stop" - no matter what script i take. I first thought that maybe the script from 1.18 wicardd packages is broken somehow, so i decided to try other scripts from other packages and still i got this error if i run shell script.

For example i took this script:

#!/bin/sh
########################################
###### Edited by RAED ######
########################################

CAMNAME="Wicardd 1.19"


remove_tmp () {
rm -rf /tmp/cainfo.* /tmp/camd.* /tmp/sc.* /tmp/*.info* /tmp/*.tmp*
[ -e /tmp/.emu.info ] && rm -rf /tmp/.emu.info
[ -e /tmp/wicardd* ] && rm -rf /tmp/wicardd*
}

case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
remove_tmp
touch /tmp/.emu.info
echo wicardd 1.19 > /tmp/.emu.info
/usr/bin/wicardd19 -d -c /etc/tuxbox/config/wicardd.conf &
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
kill `pidof wicardd19`
remove_tmp
;;
restart)
$0 stop
sleep 2
$0 start
exit
;;
*)
$0 stop
exit 0
;;
esac

exit 0

As you can see this exact script have multiple lines containing "$0 stop" but shell always reffering to the last one i.e. line 35 - command not found. I have almost no knowledge about shell scripting. Can someone point me whats wrong with various scripts refusing to work?! Thanks!
 

armsattt

Registered
Messages
2
I also tried this one:

#!/bin/sh

CAMNAME="Wicardd 1.19"

remove_tmp () {
rm -rf /tmp/*.info* /tmp/*.tmp* /tmp/*wicard*
}

case "$1" in
start)
echo "[SCRIPT] $1: $CAMNAME"
remove_tmp
/usr/bin/wicardd19 -d -c /etc/tuxbox/config/wicardd.conf &
;;
stop)
echo "[SCRIPT] $1: $CAMNAME"
killall -9 wicardd19
remove_tmp
;;
*)
$0 stop
exit 0
;;
esac

exit 0

In this example it says "command not found line 21"
 
Top