... | ... |
@@ -20,9 +20,11 @@ RTCWAKE_TIME=$([ $NOW -lt ${AWAKE_TIME//:} ] && date +%s -d $AWAKE_TIME || date |
20 | 20 |
case "$1/$2" in |
21 | 21 |
pre/suspend) |
22 | 22 |
rtcwake -m no -t $RTCWAKE_TIME |
23 |
- echo $1 $RTCWAKE_TIME > $LOG_FILE |
|
24 | 23 |
;; |
25 | 24 |
post/suspend) |
25 |
+ at -M now <<< "$0 post wait-for-trigger" > /dev/null 2>&1 |
|
26 |
+ ;; |
|
27 |
+ post/wait-for-trigger) |
|
26 | 28 |
if test $NOW -ge ${AWAKE_TIME//:} -a $NOW -le $(date +%_H%M%S -d "$AWAKE_TIME $GAP"); then |
27 | 29 |
COUNT=1 |
28 | 30 |
while sleep $WAIT_TRIGGER_DELAY && eval $WAIT_TRIGGER; do |