Page 10 of 26

Re: [App] libSoftPowerOff D/E/F/H

Posted: Tue Oct 06, 2015 2:39 pm
by zoelechat
Connect to http://IP_OF_TV:1080/cgi-bin/test.cgi in your web browser, and check from where scripts are not started.
Yeah, Oscam starts in the background if you specify -b and it's mandatory to do so in a startup script, but I was more thinking of some additional stuff dynamically updating servers user/pass for example :)

Re: [App] libSoftPowerOff D/E/F/H

Posted: Tue Oct 06, 2015 3:36 pm
by momchetoi
Unforunately I can`t open this page http://192.168.0.50:1080/cgi-bin/test.cgi - page not found

Re: [App] libSoftPowerOff D/E/F/H

Posted: Tue Oct 06, 2015 3:38 pm
by zoelechat
Disable your endless looping oscam script, I'm sure everything will work then :)
Page not found means even 06_05_apache.init is not started, I guess your oscam is 05_something, no? ANY script after it is not started, which means startup sequence is stuck inside it.

To start something "in the background", add '&' (without quotes) at the end of command. e.g.

Code: Select all

/path/to/mydeamonD -args &

Re: [App] libSoftPowerOff D/E/F/H

Posted: Tue Oct 06, 2015 3:53 pm
by momchetoi
Yes, thank you, the problem is solved. I edited oscam startup script by adding -b argument

Code: Select all

$OSCAM_DIR/$BUILD -b -c $OSCAM_DIR -w 0
Now everything is fine.
10x

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 2:40 pm
by TheTroll
Hey!

It looks like entering in soft power OFF does not shutdown the TV channels.
It means that the last channel is still being decoded by oscam in background etc ...

What is the best solution ?

What about adding a parameter : CMD_OFF:'/mnt/opt/privateer/usr/bin/cmd_off.sh'
where cmd_off.sh has:
samyGOrc -p $(pidof exeTV) 4

to switch on channel 1 that is not encrypted...
any better option ?

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 2:47 pm
by zoelechat
The one I use is simply to kill oscam as cmdoff, and restart it as cmdon. Beware that oscam will be killed even if you're being recording and enter soft off!! (I may add on option to lib to check this one day :) ...edit: done)

cmd_off.sh:

Code: Select all

#!/bin/sh
	kill $(/mnt/bin/pgrep oscam-)
cmd_on.sh:

Code: Select all

#!/bin/sh
	OSCAM_DIR=/mnt/opt/privateer/usr/bin/oscam
	$OSCAM_DIR/oscam-* -c $OSCAM_DIR -w 0 -b

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 2:58 pm
by TheTroll
Not bad indeed :)

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 3:30 pm
by zoelechat
New version, added:
1ST POST wrote:
  • NOCMDONPVR prevents 'CMD:' scripts to be launched if PVR is active (for example if you use cmd_off script to kill oscam and don't want your current recording to end prematurely on soft-off ;) ). CMD_ON won't be launched if CMD_OFF wasn't launched due to active PVR.

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 3:47 pm
by TheTroll
Here is what I get in logs:

X?AJB?T4??Off] Launching CMD_OFF: A/
[SoftPowerOff] Launching CMD_ON: AX?AX?A

OPTIONS is
OPTIONS="CMD_ON:'/mnt/opt/privateer/usr/bin/cmd_on.sh' CMD_OFF:'/mnt/opt/privateer/usr/bin/cmd_off.sh'"

Is it wrong ?

Re: [App] libSoftPowerOff D/E/F/H

Posted: Thu Oct 08, 2015 3:50 pm
by TheTroll
The log also says :
[SoftPowerOff] Setting soft-ON command: '/mnt/opt/privateer/usr/bin/cmd_on.sh'
[SoftPowerOff] Setting soft-OFF command: '/mnt/opt/privateer/usr/bin/cmd_off.sh'

And the commands work in command line