From 7f44d12134720c17a061bf7b1d0c7c7284571d27 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Thu, 9 May 2024 15:33:23 +0200 Subject: [PATCH] Enable suspend action correctly --- bup-sync-trigger.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/bup-sync-trigger.sh b/bup-sync-trigger.sh index 57381e8..5c320dc 100755 --- a/bup-sync-trigger.sh +++ b/bup-sync-trigger.sh @@ -115,12 +115,6 @@ goToSleep() { rtcwake --mode disk --date "$nextStart" } -if ! triggerLiesInPast -then - echo "The timestamp in the trigger event lies in the future. Waiting further." - exit 0 -fi - if [ -n "$suspend" ] then if [ -f "$lockFile" -o -n "$preventSleep" ] @@ -133,6 +127,12 @@ then fi fi +if ! triggerLiesInPast +then + echo "The timestamp in the trigger event lies in the future. Waiting further." + exit 0 +fi + echo "The backup script is triggered." while read line