#!/bin/bash
#
# This script reserves access to a machine so that a user can run arbitrary
# programs on the machine. -- This scripts renews the lease for the specified
# amount of time
#
# reqparam value The number of minutes to renew the lease for (how much more time do you want)
#

. /etc/autobench.conf || . functions

if [ $# -lt 1 ]; then
  echo "You must specify the number of minutes you want your lease for"
  exit 1
fi

echo $1 > $TMPDIR/user-access/lease-time
START=`date`
echo $START > $TMPDIR/user-access/lease-start
kill `cat $TMPDIR/user-access/sleep.pid`
