Shutdown and reboot your raspberry pi with a single Click
sudo adduser pi-web-console
chsh /usr/sbin/nologin pi-web-console
sudo mkdir /opt/pi-web-console
cd /opt
git clone https://github.com/hirle/pi-web-console.git
cd /opt/pi-web-console
npm install
cd /opt/pi-web-console
sudo cp pi-web-console.service /etc/systemd/system
sudo systemctl enable pi-web-console.service
sudo visudo
In the section User privilege specification
, add those two lines. They will allow the user pi-web-console to run the command shutdown.
pi-web-console ALL=/sbin/shutdown
pi-web-console ALL=NOPASSWD: /sbin/shutdown
To run locally pi-web-server:
- install NodeJS, v8.11.3 at least
npm start