From 3c55937f80cdaed76c0f273c24733a3c427c0df9 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sat, 9 Sep 2017 15:30:57 +0200 Subject: [PATCH] - skel-root: small adds --- skel-root/coolstream/hd1/etc/init.d/emu | 37 +++++++++++++++++++++++++ skel-root/coolstream/hd2/etc/init.d/emu | 37 +++++++++++++++++++++++++ 2 files changed, 74 insertions(+) diff --git a/skel-root/coolstream/hd1/etc/init.d/emu b/skel-root/coolstream/hd1/etc/init.d/emu index 9cf2ad27..208dbf57 100755 --- a/skel-root/coolstream/hd1/etc/init.d/emu +++ b/skel-root/coolstream/hd1/etc/init.d/emu @@ -9,6 +9,7 @@ F_NEWCS=".newcs" F_OSEMU=".osemu" F_DOSCAM=".doscam" F_OSCAM=".oscam" +F_NCAM=".ncam" F_GBOX=".gbox" F_CS2GBOX=".cs2gbox" @@ -150,6 +151,35 @@ OSCAM_Action() esac } +NCAM_Action() +{ + case $1 in + "start" ) + SHOWINFO "start oscamfix" + /etc/init.d/oscamfix start ncam + SHOWINFO "start ncam" + /var/bin/ncam -b + if [ -e $FLAGDIR/$F_MGCAM ]; then + sleep 15 + fi + ;; + "stop" ) + SHOWINFO "stop oscamfix" + /etc/init.d/oscamfix stop ncam + SHOWINFO "stop ncam" + killall ncam + sleep 1 + rm -rf /tmp/ncam.* + rm -rf /tmp/ecm.info + ;; + * ) + NCAM_Action "stop" + sleep 1 + NCAM_Action "start" + ;; + esac +} + GBOX_Action() { case $1 in @@ -216,6 +246,9 @@ EMU_Action() "oscam") OSCAM_Action $ACTION ;; + "ncam") + NCAM_Action $ACTION + ;; "newcs") NEWCS_Action $ACTION ;; @@ -243,6 +276,10 @@ EMU_Action() OSCAM_Action $ACTION fi + if [ -e $FLAGDIR/$F_NCAM ]; then + NCAM_Action $ACTION + fi + if [ -e $FLAGDIR/$F_NEWCS ]; then NEWCS_Action $ACTION fi diff --git a/skel-root/coolstream/hd2/etc/init.d/emu b/skel-root/coolstream/hd2/etc/init.d/emu index 9cf2ad27..208dbf57 100755 --- a/skel-root/coolstream/hd2/etc/init.d/emu +++ b/skel-root/coolstream/hd2/etc/init.d/emu @@ -9,6 +9,7 @@ F_NEWCS=".newcs" F_OSEMU=".osemu" F_DOSCAM=".doscam" F_OSCAM=".oscam" +F_NCAM=".ncam" F_GBOX=".gbox" F_CS2GBOX=".cs2gbox" @@ -150,6 +151,35 @@ OSCAM_Action() esac } +NCAM_Action() +{ + case $1 in + "start" ) + SHOWINFO "start oscamfix" + /etc/init.d/oscamfix start ncam + SHOWINFO "start ncam" + /var/bin/ncam -b + if [ -e $FLAGDIR/$F_MGCAM ]; then + sleep 15 + fi + ;; + "stop" ) + SHOWINFO "stop oscamfix" + /etc/init.d/oscamfix stop ncam + SHOWINFO "stop ncam" + killall ncam + sleep 1 + rm -rf /tmp/ncam.* + rm -rf /tmp/ecm.info + ;; + * ) + NCAM_Action "stop" + sleep 1 + NCAM_Action "start" + ;; + esac +} + GBOX_Action() { case $1 in @@ -216,6 +246,9 @@ EMU_Action() "oscam") OSCAM_Action $ACTION ;; + "ncam") + NCAM_Action $ACTION + ;; "newcs") NEWCS_Action $ACTION ;; @@ -243,6 +276,10 @@ EMU_Action() OSCAM_Action $ACTION fi + if [ -e $FLAGDIR/$F_NCAM ]; then + NCAM_Action $ACTION + fi + if [ -e $FLAGDIR/$F_NEWCS ]; then NEWCS_Action $ACTION fi