Skip to content

Instantly share code, notes, and snippets.

@mceachen
Last active June 28, 2019 23:34
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 mceachen/6efdbc964635cdc0ad0b07126d1cbb89 to your computer and use it in GitHub Desktop.
Save mceachen/6efdbc964635cdc0ad0b07126d1cbb89 to your computer and use it in GitHub Desktop.
Gracefully shut down when the network shuts down.
#!/bin/sh
# This should be placed in /etc/network/if-post-down.d/shutdown, and set as executable.
/sbin/shutdown -h now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment