Change cccam mgcamd


trying to create a script to change during the operational to the cam.
Unfortunately I am not yet succeeded.
I noticed that a start in the telnet does not work, if the cam is not in the autostart.
can you help me?



cccam_ modul

openxcas.conf


Code:
[module]
name = CCcamCAS
daemon = cccam_module.sh
version = 1.00
api=yes
wait =10sec
cccam_module.sh

Code:
#!/bin/sh
killall -9 cccam_module &
killall -9 mgcamd &
sleep 2
rm -rf /tmp/*.info* /tmp/*.pid*
sleep 5

cd /EMU/OpenXCAS/CCcamCAS
./cccam_module &


mgcamd

openxcas.conf



Code:
[module]
name = mgcamd
daemon = mgcamd.sh
api = yes
wait = 15sec
version = 1.32
# argument = -a 3

mgcamd.sh

Code:
#!/bin/sh
killall -9 mgcamd &
killall -9 cccam_module &

sleep 2
rm -rf /tmp/*.info* /tmp/*.pid*
sleep 5

cd /EMU/OpenXCAS/mgcamd
./mgcamd &