[App] libSoftPowerOff D/E/F/H

Here are software that related with Samsung F series TVs.
Please don't create any new topic here unless you have software to post/release.

TheTroll
SamyGO Project Donor
Posts: 33
Joined: Fri Oct 31, 2014 4:47 pm

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

Post by TheTroll »

One think a little bit strange though.
The very first call to the off.sh script does not kill oscam.
But if i kill it manually, on.sh and off.sh works as expected.

Have you noticed this ?
zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

mmmh no, you might try to loop it, and see if it ends in being killed. I voluntarily don't use kill -9 for process to be killed "properly" (->save .ccache). Using something like:

Code: Select all

while [ "$(/mnt/bin/pgrep oscam-)" ] ; do
   kill $(/mnt/bin/pgrep oscam-)
   sleep 1
done
I do NOT receive any PM. Please use forum.
TheTroll
SamyGO Project Donor
Posts: 33
Joined: Fri Oct 31, 2014 4:47 pm

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

Post by TheTroll »

Yes i could try that :)
TheTroll
SamyGO Project Donor
Posts: 33
Joined: Fri Oct 31, 2014 4:47 pm

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

Post by TheTroll »

Ok I know why :)

When started from /mnt/etc/init.d, oscam is started as root.
But the script is invoked as "app" !

How do you manage that ?
TheTroll
SamyGO Project Donor
Posts: 33
Joined: Fri Oct 31, 2014 4:47 pm

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

Post by TheTroll »

Yeah this is very bad :) cmd_on runs oscam as "app" so all "root" oscam conf files are not editable etc ...
TheTroll
SamyGO Project Donor
Posts: 33
Joined: Fri Oct 31, 2014 4:47 pm

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

Post by TheTroll »

Here is how i fixed it :

change
$OSCAM_DIR/$BUILD -b -c $OSCAM_DIR -w 0
to
su app -c "$OSCAM_DIR/$BUILD -b -c $OSCAM_DIR -w 0"
in init script
and
chown app:app -R /mnt/opt/privateer/usr/bin/oscam/
zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

Ah right, forgot that on H :D

You have to pipe to nc:

Code: Select all

echo "kill $(/mnt/bin/pgrep oscam-)" | /dtv/bin/nc localhost 2023
Simpler than your solution :)
I do NOT receive any PM. Please use forum.
TheTroll
SamyGO Project Donor
Posts: 33
Joined: Fri Oct 31, 2014 4:47 pm

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

Post by TheTroll »

oh ok :)
better solution

same thing goes for cmd_on i guess ?
zoelechat
SamyGO Moderator
Posts: 8616
Joined: Fri Apr 12, 2013 7:32 pm
Location: France

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

Post by zoelechat »

yep :)

I thought I had told H specific case in 1st post, obviously no :D
I do NOT receive any PM. Please use forum.
TheTroll
SamyGO Project Donor
Posts: 33
Joined: Fri Oct 31, 2014 4:47 pm

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

Post by TheTroll »

But the solution to run oscam as "app" seems fine as well, don't you think ?

Post Reply

Return to “[F] Software”