1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
#!/bin/sh # $Id$ if [ -f /var/run/config.lock ]; then echo "Cannot reboot at this moment, a config write operation is in progress." exit -1 fi sleep 1 killall -TERM sshd 2>&1 /dev/null /sbin/shutdown -p now