2013-10-05, 11:14
Hello Bj1
Thanks for your answer.
/home/bm/.xbmc/addons/script.program.pvrmanager/resources/lib
~/.xbmc/addons/script.program.pvrmanager/resources/lib$ ls -l
total 8
-rwxr-xr-x 1 bm bm 262 oct. 2 13:56 shutdown.sh
and the shutdown script (I added "sudo" in front of "shutdown -h now ....." in order to run it as root).
#! /bin/sh
sleep 2
case "$1" in
ACPI)
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo $2 > /sys/class/rtc/rtc0/wakealarm
;;
NVRAM)
nvram-wakeup -C /etc/nvram-wakeup.conf --directisa -s $2
;;
esac
sudo /sbin/shutdown -h now "PVRManager shutdown the system"
This script runs very well (it shutdowns the system) when launch by "bm", my user.
./shutdown.sh
.....
stop the system.
And the sudoers:
bm All=NOPASSWD: /sbin/shutdown,/home/bm/.xbmc/addons/script.program.pvrmanager/resources/lib/shutdown.sh
In the config, I don't check ethernet connections.
Nothing in syslog, neither in wbmc.log (just the same things as pvrmanager.log):
05.10.2013 10:54:29: No PIDFile found, assuming that system just powered on.
05.10.2013 10:54:29: Service(900) finished.
05.10.2013 10:54:29: <<<
05.10.2013 10:54:44: Wakeup for Recording by ACPI at 05.10.2013 11:01:00 (UNIX-Time: 1380963660).
05.10.2013 10:54:49: Instruct the system to shut down.
05.10.2013 10:54:49: Service(838) finished.
05.10.2013 10:54:49: <<<
I don't understand ....
I'm going to make some other tests ....
thanks to you if you have any idea.
Have a good week end !
Thanks for your answer.
/home/bm/.xbmc/addons/script.program.pvrmanager/resources/lib
~/.xbmc/addons/script.program.pvrmanager/resources/lib$ ls -l
total 8
-rwxr-xr-x 1 bm bm 262 oct. 2 13:56 shutdown.sh
and the shutdown script (I added "sudo" in front of "shutdown -h now ....." in order to run it as root).
#! /bin/sh
sleep 2
case "$1" in
ACPI)
echo 0 > /sys/class/rtc/rtc0/wakealarm
echo $2 > /sys/class/rtc/rtc0/wakealarm
;;
NVRAM)
nvram-wakeup -C /etc/nvram-wakeup.conf --directisa -s $2
;;
esac
sudo /sbin/shutdown -h now "PVRManager shutdown the system"
This script runs very well (it shutdowns the system) when launch by "bm", my user.
./shutdown.sh
.....
stop the system.
And the sudoers:
bm All=NOPASSWD: /sbin/shutdown,/home/bm/.xbmc/addons/script.program.pvrmanager/resources/lib/shutdown.sh
In the config, I don't check ethernet connections.
Nothing in syslog, neither in wbmc.log (just the same things as pvrmanager.log):
05.10.2013 10:54:29: No PIDFile found, assuming that system just powered on.
05.10.2013 10:54:29: Service(900) finished.
05.10.2013 10:54:29: <<<
05.10.2013 10:54:44: Wakeup for Recording by ACPI at 05.10.2013 11:01:00 (UNIX-Time: 1380963660).
05.10.2013 10:54:49: Instruct the system to shut down.
05.10.2013 10:54:49: Service(838) finished.
05.10.2013 10:54:49: <<<
I don't understand ....
I'm going to make some other tests ....
thanks to you if you have any idea.
Have a good week end !