Skip to content

Instantly share code, notes, and snippets.

@Mustaavalkosta
Last active December 13, 2015 22:38
Show Gist options
  • Save Mustaavalkosta/df1d40361deaab8ae1f5 to your computer and use it in GitHub Desktop.
Save Mustaavalkosta/df1d40361deaab8ae1f5 to your computer and use it in GitHub Desktop.
APC UPS / NUT shutdown sequence
#!/bin/bash
# Wait for NAS to shut down
while ping -c 1 -W 1 192.168.11.3 &>/dev/null ; do
sleep 5
done
# Shutdown system
/sbin/shutdown -h +0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment