Seria asi el Script.

Ver por Mbox , compartir por Mbox + CCcam y leer la Card por Sbox.


#!/bin/sh




CAMNAME="|Mbox| + CCcam + Sbox"




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








echo "[SCRIPT] $1: $CAMNAME"
start_cam ()
{
remove_tmp
sleep 3
sed -i '/A: { 1 }/d' /usr/keys/mbox.cfg
if ! grep '^P:.*' /usr/keys/mbox.cfg > /dev/null
then
echo "P: { 2/tmp/camd.socket }" >> /usr/keys/mbox.cfg
fi
start-stop-daemon -S -x /usr/bin/mbox > /dev/null &
sleep 18
if ! grep '^DVB API*' /etc/CCcam.cfg > /dev/null
then
echo "DVB API: -1" >> /etc/CCcam.cfg
fi
start-stop-daemon -S -x /usr/bin/CCcam &
sleep 2
start-stop-daemon -S -x /usr/bin/Sbox &
}
echo "[SCRIPT] $1: $CAMNAME"
stop_cam ()
{
remove_tmp
touch /tmp/mbox.kill
sleep 5
start-stop-daemon -K -s 9 -x /usr/bin/CCcam
start-stop-daemon -K -s 9 -x /usr/bin/mbox
start-stop-daemon -K -s 9 -x /usr/bin/Sbox
}
case "$1" in
start)
start_cam
;;
stop)
stop_cam
;;
restart)
$0 stop
$0 start
;;
*)

esac




exit 0


No se si estaria bien.