If you can't -> real-off

Code: Select all
touch /tmp/softoff
Code: Select all
rm /tmp/softoff
I think its my solution.zoelechat wrote:In case you were talking about ON vs. soft-OFF, you can use cmd_on/cmd_off to write/delete some flag. e.g.:
Code: Select all
touch /tmp/softoff
Then check if file exists to know state.Code: Select all
rm /tmp/softoff
I could log it but I don't think it's necessary since most people are in front of their TV when they're watching it.
Simplest way!zoelechat wrote:Set offtimer from TV menu. Done.
Code: Select all
[SoftPowerOff] Launching CMD_OFF: /mnt/opt/privateer/usr/bin/cmd_off.sh
[SoftPowerOff] -> Returns: 0
[SoftPowerOff] Launching CMD_ON: /mnt/opt/privateer/usr/bin/cmd_on.sh
[SoftPowerOff] -> Returns: 0
Code: Select all
#!/bin/sh
echo "/mnt/opt/privateer/usr/bin/oscam/oscam-* -c /mnt/opt/privateer/usr/bin/oscam -w 0 -b" | /dtv/bin/nc localhost 3023
Code: Select all
#!/bin/sh
echo "kill $(/mnt/bin/pgrep oscam-)" | /dtv/bin/nc localhost 3023
Code: Select all
#!/bin/sh
[ -e /tmp/.${0##*/} ] && exit 0
echo OK > /tmp/.${0##*/}
SODIR=/mnt/opt/privateer/usr/libso
SAMYGOSODIR=/mnt/opt/privateer/usr/bin
echo "$SAMYGOSODIR/samyGOso -A -B -l $SODIR/libAirToSat.so CABLE" | /dtv/bin/nc localhost 3023
sleep 2 # no new execution allowed before 2 seconds
rm /tmp/.${0##*/}
Code: Select all
[RCremap] mapping key: 'KEY_RED' to command: '/mnt/opt/privateer/usr/bin/CMD_libAirToSat'
[RCremap] 1 _ZN9KeyCommon17SendKeyPressInputEiis [0x9f2884].
[RCremap] init done...
Code: Select all
/mnt # /mnt/opt/privateer/usr/bin/cmd_off.sh
/mnt #
Code: Select all
http://ctrlv.it/id/3006/6645460
Code: Select all
/mnt # /mnt/opt/privateer/usr/bin/CMD_libAirToSat
samyGOso v1.2.5 (c) bugficks 2013-2014, sectroyer 2014-2015
Injecting '/mnt/opt/privateer/usr/libso/libAirToSat.so' resident: '0'
cannot attach to 142, error!
Failed.
/mnt #