Skip to content

Instantly share code, notes, and snippets.

@flowolf
Created July 5, 2018 12:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flowolf/135ca463eca7f5ad5a88d5fec1b72fcb to your computer and use it in GitHub Desktop.
Save flowolf/135ca463eca7f5ad5a88d5fec1b72fcb to your computer and use it in GitHub Desktop.
#! /bin/sh
### BEGIN INIT INFO
# Provides: pi_shutdown
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: S
# Default-Stop:
# Short-Description: Shutdown on GPIO trigger
# Description: Python script listens for GPIO and runs shutdown command
### END INIT INFO
sudo python /home/pi/scripts/shutdown.py &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment