#!/bin/bash # # This uses Physical pin 5 - that's one of the I2C pins # which is pulled high by the on-board 1K8 resistor. # When 'halted' the GPU is monitoring it and if you # take it low again, it reboots the Pi # gpio -1 wfi 5 falling echo "Halting now" /usr/bin/sudo /sbin/halt