#!/bin/sh
# totermann schaltung (script).
# If nobody touches a file /tmp/iamhere within 5 minutes
# this script will reboot the machine to default settings
# 
# This can be very practical for remote administration tasks
# Author: Aaron Kaplan <aaron@lo-res.org> , 2005 and 2006, Vienna, Austria
# Copyright: GPL version 2 or higher
# for a copyright notice see http://www.gnu.org


SLEEPTIME=300

rm /tmp/iamhere
echo "sleeping for $SLEEPTIME seconds"

sleep $SLEEPTIME

if [  -f /tmp/iamhere ]; then
  echo "all ok"
else
  echo "rebooting"
  /sbin/reboot
fi


