04-10-2023, 12:25 PM
You could try a little hacking.
Add these 3 echo lines to the beginning of /var/www/daemon/watchdog.sh like below.
Add these 3 echo lines to the beginning of the if block in /var/local/www/commandw/restart.sh
Add these 3 echo lines to the beginning of /var/www/daemon/watchdog.sh like below.
Code:
.
.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
echo "17" >/sys/class/gpio/export
echo "out" >/sys/class/gpio/gpio17/direction
echo "1" >/sys/class/gpio/gpio17/value
.
.
Add these 3 echo lines to the beginning of the if block in /var/local/www/commandw/restart.sh
Code:
.
.
if [[ $1 = "poweroff" ]]; then
echo "17" >/sys/class/gpio/export
echo "out" >/sys/class/gpio/gpio17/direction
echo "0" >/sys/class/gpio/gpio17/value
.
.