#!/bin/sh
# sets the variable for a sheduled time to shutdown geexbox

sleepin=$1

if [ "$sleepin" = "0" ]; then
  echo "0" > /var/downtime
else
  uptime=`cat /proc/uptime | cut -f1 -d.`
  echo $(($uptime+$sleepin)) > /var/downtime
fi
