05-25-2018, 06:46 PM
Hi rikardo1979,
I followed your howto, thank you very much for this clear document.
a couple of points:
Bash files (if you open then, you see they start with #!/bin/bash or similar, indeed need to be executable, so the chmod +x is indeed mandatory.
As for the worker.php file: i started with a clean Moode 4.1 setup. Since Moode 4.0 it seems these reboot/poweroff script parts are in:
/var/local/commandw/restart.sh
should be even easier. ;-)
Code is now:
I followed your howto, thank you very much for this clear document.
a couple of points:
Bash files (if you open then, you see they start with #!/bin/bash or similar, indeed need to be executable, so the chmod +x is indeed mandatory.
As for the worker.php file: i started with a clean Moode 4.1 setup. Since Moode 4.0 it seems these reboot/poweroff script parts are in:
/var/local/commandw/restart.sh
should be even easier. ;-)
Code is now:
Code:
case 'reboot':
mpc stop
systemctl stop nginx
/home/pi/softreboot.sh
break;
case 'poweroff':
mpc stop
systemctl stop nginx
/home/pi/softshutdown.sh
break;