blob: 3b9dc0ecc89bd3c3ae5ffbd60c6e2daad3a878f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
timefile=/etc/resumeat
mkdir -p /var/spool/at
[ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger
while true; do
cat /var/spool/at/trigger | while read line; do
FILE=`ls -1 /var/spool/at/[0-9]* | head -n1`
echo "File = $FILE"
if [ -z "$FILE" ]; then
echo "clear resume at"
echo "" >$timefile
else
unixtime=`basename $FILE | cut -c1-10`
echo "Datestring = $unixtime"
echo "$unixtime" >$timefile
fi
done
done
|