-rwxr-xr-x | core/opiealarm/opieatd | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/opiealarm/opieatd b/core/opiealarm/opieatd index fc2d421..34dfb2e 100755 --- a/core/opiealarm/opieatd +++ b/core/opiealarm/opieatd | |||
@@ -5,33 +5,33 @@ timefile=/etc/resumeat | |||
5 | trap exit 0 SIGTERM SIGINT SIGQUIT | 5 | trap exit 0 SIGTERM SIGINT SIGQUIT |
6 | 6 | ||
7 | echo $$ >/var/run/opieatd.pid | 7 | echo $$ >/var/run/opieatd.pid |
8 | 8 | ||
9 | mkdir -p /var/spool/at | 9 | mkdir -p /var/spool/at |
10 | [ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger | 10 | [ -p /var/spool/at/trigger ] || mkfifo /var/spool/at/trigger |
11 | 11 | ||
12 | while true; do | 12 | while true; do |
13 | while read </var/spool/at/trigger dummy; do | 13 | while read </var/spool/at/trigger dummy; do |
14 | FILES=`ls /var/spool/at/[0-9]* 2>/dev/null` | 14 | FILES=`ls /var/spool/at/[0-9]* 2>/dev/null` |
15 | 15 | ||
16 | if [ -z "$FILES" ]; then | 16 | if [ -z "$FILES" ]; then |
17 | echo "clear resume at" | 17 | # echo "clear resume at" |
18 | echo "" >$timefile | 18 | echo "" >$timefile |
19 | else | 19 | else |
20 | for i in "$FILES"; do | 20 | for i in "$FILES"; do |
21 | echo "File = $i" | 21 | # echo "File = $i" |
22 | 22 | ||
23 | unixtime=`basename $i | cut -c1-10` | 23 | unixtime=`basename $i | cut -c1-10` |
24 | pid=`basename $i | cut -c12-` | 24 | pid=`basename $i | cut -c12-` |
25 | 25 | ||
26 | if [ -d /proc/$pid ]; then | 26 | if [ -d /proc/$pid ]; then |
27 | echo "Datestring = $unixtime" | 27 | # echo "Datestring = $unixtime" |
28 | echo "$unixtime" >$timefile | 28 | echo "$unixtime" >$timefile |
29 | else | 29 | else |
30 | rm -f $i | 30 | rm -f $i |
31 | fi | 31 | fi |
32 | done | 32 | done |
33 | fi | 33 | fi |
34 | done | 34 | done |
35 | done | 35 | done |
36 | 36 | ||
37 | exit 0 | 37 | exit 0 |