To properly shutdown Raspberry Pi when ignition signal disappears, an electrical line was provided to notify the need to shutdown. The shutdown daemon, monitors this line (pin 13 on P1 header of Raspberry Pi). When this pin goes low, a shutdown command is issued.

Downlaod the daemon

Click here to download the shutdown daemon, or follow installation steps below:

Install the daemon

Enter home directory:

cd /home/pi/

Download the daemon:

curl -O -J

Untar the file:

tar -xvf shutdown_d_1.0.tar

Add execution rights:

chmod +x /home/pi/shutdown_d/

Add a new line to the /etc/rc.local before exit 0 line.

sudo nano /etc/rc.local


exit 0

System Reboot:

sudo reboot

Check daemon exexution

Check daemon execution:

ps aux | grep shutdown

You have to see something like this:

pi@raspberrypi ~ $ ps aux | grep shutdown
root      2058  0.4  0.2   2736  1188 ?        S    14:40   0:00 /bin/bash /home/pi/shutdown_d/
pi        2380  0.0  0.1   3568   832 pts/0    S+   14:42   0:00 grep --color=auto shutdown
pi@raspberrypi ~ $

Test the daemon

To test the daemon, take a wire, and jump toghether pin 13 and pin 25 of P1 connector on Raspberry Pi. Raspberry Pi will halt now!.