diff --git a/bundles/wol-sleeper/files/suspend_if_idle b/bundles/wol-sleeper/files/suspend_if_idle index 6e93443..c66bded 100644 --- a/bundles/wol-sleeper/files/suspend_if_idle +++ b/bundles/wol-sleeper/files/suspend_if_idle @@ -3,7 +3,7 @@ WOKE=$(expr $(journalctl -t systemd-sleep -b 0 -o json MESSAGE="System resumed." -n1 | jq -r .__REALTIME_TIMESTAMP) / 1000000) NOW=$(date +%s) UPTIME=$(expr $NOW - $WOKE) -MIN_UPTIME=$(expr 60 \* 10) +MIN_UPTIME=$(expr 60 \* 15) if [[ "$UPTIME" -lt "$MIN_UPTIME" ]] then echo "ABORT: uptime ($UPTIME s) lower than minimum ($MIN_UPTIME s)" @@ -33,6 +33,7 @@ fi if [[ "$1" = now ]] then echo "SESPENDING" + sleep 60 systemctl suspend else echo "WOULD SESPEND"