Launching NCAM_Ci as a normal script

AlexWilMac

Moderator
Hi,
I need to run the NCAM_Ci.sh not by the 2xBLUE button but as a normal script but if I copy its lines into another script, it doesn't start.
So I tried to copy it into the script folder (/usr/script) also because I hoped, at least, I could add a crontimer, but again it doesn't work.
How can I edit this camscript to make it "independent" by the 2xBLUE procedure?
 
But as one of the oldest mebers of this Community Alex you should now that we need at least STB and Image in use to be of any help :laugh::laugh::laugh:;)
and maybe some info about the purpouse, why you want use the regular blue button and setup a cron for regular restart of the CI Cam?

But i guess you use OBH?
 

AlexWilMac

Moderator
Yes, but as this script is exactly the same in BH or in OBH, I didn't specify that. It's a system script for C.I.
And the try by CronTimer was just an alternative but not the preferred one.
The purpose it's a bit complex but, basically, is about my intention to include the launch of this system script within another script of mines.
Obviously, just including it as it is, didn't work. ;)

I hope it's more clear, now.
 
Well the camscripts hold both the start and stop so if you run that script manual you will only stop the cam since thats the last in the script.

If you create one script for start and one for stop and then run the separate it should work with cron.
THis is not a nice way to do it but i think it would work
 

AlexWilMac

Moderator
I've tried... The "stop" alone works, the "start" alone also does; the restart doesn't. And this is the problem: in theory, including in my script the STOP and the START in sequence, it should work, but it doesn't. Mystery (for me)!
 

AlexWilMac

Moderator
Actually, as I got more curious today, stimulated by the reopening of this thread, I found out that i should take from the C.I. script only the essential lines, only the ones that initially stop and then start (the restart is only by the GUI, it seems). So, this way:

CAMNAME="Common Interface"

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

#Manual STOP
remove_tmp
exec start-stop-daemon -K -R 2 -x /usr/bin/vucamd

# Manual START
remove_tmp
ulimit -s 1024
exec start-stop-daemon -S -x /usr/bin/vucamd

and it worked! The trick was to delete all the other lines used by the script and the CASE construct.
 

AlexWilMac

Moderator
There are always positive sides, also in more negative ones, like this forced lockdown...
After all, until we are talking about such amusing stuff, it's a good sign ;)
 

AlexWilMac

Moderator
No, I'm not so good at programming, nowadays...
It was just a curiosity to force this restart. Sometimes, I try things just for academical reasons!
 
Top