Enable suspend action correctly

This commit is contained in:
Christian Wolf 2024-05-09 15:33:23 +02:00
parent 9229a0cec7
commit 7f44d12134

View File

@ -115,12 +115,6 @@ goToSleep() {
rtcwake --mode disk --date "$nextStart" 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" ] if [ -n "$suspend" ]
then then
if [ -f "$lockFile" -o -n "$preventSleep" ] if [ -f "$lockFile" -o -n "$preventSleep" ]
@ -133,6 +127,12 @@ then
fi fi
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." echo "The backup script is triggered."
while read line while read line