Hi,
The way the different softcam script are written for each Softcam can lead to error.
Can I propose that each softcam launch script use this new script.
It use variables for the executable name and for the parameters, with this way of working there is no error possible in the script.
#!/bin/sh
# Define parameters here
# start-exe = executable to launch
# softcam_param = full command line parameters to pass to executable
softcam_exe="/usr/bin/oscam"
softcam_param="-b -r 2 -c /etc/tuxbox/config/oscam"
softcam_info="oscam"
remove_tmp ()
{
[ -e /tmp/ecm.info ] && rm -rf /tmp/ecm.info
[ -e /tmp/.oscam ] && rm -rf /tmp/.oscam
[ -e /tmp/.console ] && rm -rf /tmp/.console
[ -e /tmp/camd.socket ] && rm -rf /tmp/camd.socket
}
case "$1" in
start)
exec start-stop-daemon -S -x $softcam_exe -- $softcam_param
;;
stop)
exec start-stop-daemon -K -R 2 -x $softcam_exe &
sleep 3
ps | grep $softcam_exe | grep -v grep > /dev/null
if [ $? -eq 0 ]
then
killall -9 $softcam_exe 2>/dev/null
fi
sleep 2
remove_tmp
;;
restart|reload)
$0 stop
sleep 4
$0 start
;;
version)
$softcam_exe -V | head -n 1 | awk '{print $2}'
;;
info)
echo $softcam_info
;;
values)
echo "Command line started:"
echo $softcam_exe $softcam_param
;;
*)
echo "Usage: $0 start|stop|restart|version|info|values"
exit 1
;;
esac
exit 0
Edited by Pr2, 30 May 2013 - 13:38.
NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.
Wanna help with OpenPLi Translation? Please read our Wiki Information for translators
Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)
AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2