Enable suspend action correctly
This commit is contained in:
parent
9229a0cec7
commit
7f44d12134
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user