#!/bin/sh timefile=/etc/resumeat trap exit 0 SIGTERM SIGINT SIGQUIT echo $$ >/var/run/opieatd.pid mkdir -p /var/spool/at [ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger while true; do while read /dev/null` if [ -z "$FILES" ]; then # echo "clear resume at" echo "" >$timefile else for i in "$FILES"; do # echo "File = $i" unixtime=`basename $i | cut -c1-10` pid=`basename $i | cut -c12-` if [ -d /proc/$pid ]; then # echo "Datestring = $unixtime" echo "$unixtime" >$timefile else rm -f $i fi done fi done done exit 0