diff options
| author | Raymaekers Luca <luca@spacehb.net> | 2025-06-25 10:16:49 +0200 |
|---|---|---|
| committer | Raymaekers Luca <luca@spacehb.net> | 2025-06-25 10:16:49 +0200 |
| commit | 0de0f0922a2c3ce0246c99c8f6f276d06cf11531 (patch) | |
| tree | 71028e93f32be21efdb4cf50dd77237f96fab8ee /bin/extra/saveself | |
| parent | 32518bbe83424217a55399c721816a4e69c23b22 (diff) | |
checkpoint
Diffstat (limited to 'bin/extra/saveself')
| -rwxr-xr-x | bin/extra/saveself | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/bin/extra/saveself b/bin/extra/saveself index 8906a5f..90eba98 100755 --- a/bin/extra/saveself +++ b/bin/extra/saveself @@ -17,20 +17,15 @@ PrevCapacity="$(GetBatteryCapacity)" while true do - sleep 5 Capacity="$(GetBatteryCapacity)" if [ "$Capacity" -lt "$PrevCapacity" ] then if [ "$Capacity" -le "$Threshold" ] then - setsid slock HostName="$(hostname)" if [ "$HostName" = "spring" ] then - doas /usr/sbin/zzz -Z - elif [ "$HostName" = "winter" ] - then - systemctl hibernate + setsid doas /usr/sbin/zzz -Z fi fi PrevCapacity="$Capacity" |
