Service to Safe Shutdown Headless Raspberry Pi Boards

Run a service to start and safe shutdown Pi boards using a momentary push-button switch.

Everytime when you need to shutdown headless Pi boards, either you need to plugin a monitor or SSH into the Pi. By connecting a pushbutton across GPIO and by running a service, now you can safe shutdown and restart Pi boards.

1. Clone the git:

git clone https://github.com/shivasiddharth/pi-shut

2. Run the installer.

sudo chmod +x /home/pi/pi-shut/installer.sh  
sudo /home/pi/pi-shut/installer.sh  

3. Wire the Pi as per the diagram.

Service-to-Safe-Shutdown-Headless-Raspberry-Pi-Boards

4. Start the shutdown service.

 sudo systemctl start on-off-pushbutton.service

Now, you have the service to safe shutdown and restart Pi working.

Source: Service to Safe Shutdown Headless Raspberry Pi Boards


About The Author

Muhammad Bilal

I am highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Scroll to Top