Shutdown OS and kill power to nanopi2
Posted: Thu Jun 30, 2016 4:16 pm
by kconger
I'd like a way to gracefully shutdown the nanopi2 and kill the power or minimally just kill the power. Is the pads to solder a switch or button to shut off power to the nanopi2? Or has anyone else came up with a solution?
Re: Shutdown OS and kill power to nanopi2
Posted: Sun Jul 10, 2016 10:05 am
by davef
One way would be to monitor one of the GPIO as an input and when it goes low have it run a Bash script to issue a shutdown command.
This probably requires another program running (PHP?) running as a background task.
Read up about the exec command for Bash and PHP.