#!/bin/sh
#
# Check to see if a nightly reboot has been requested and if so reboot.

REBOOT_FILE=/tmp/want_reboot

if [ -f ${REBOOT_FILE} ]; then
	message=`/usr/bin/head -1 ${REBOOT_FILE}`
	if [ -z "${message}" ]; then
		message="Reboot requested by host."
	fi

	/sbin/shutdown -r now "${message}"
fi
