fix: fix shutdown timer

The shutdown timer was being activated every minute, but then had a 15
minute delay before shutting down. This just caused the delay to keep
resetting and the system to never shut down. This commit decreases the
shutdown delay to 10 minutes, and changes the timer to hit every 15
minutes.
This commit is contained in:
Benjamin Bädorf 2023-10-04 12:09:28 +02:00
parent ecca4f71f0
commit e1b1d24572
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C

View file

@ -1,5 +1,5 @@
{pkgs, ...}: let {pkgs, ...}: let
shutdownWaitMinutes = 15; shutdownWaitMinutes = 10;
shutdownScript = pkgs.writeShellScriptBin "shutdown-wait" '' shutdownScript = pkgs.writeShellScriptBin "shutdown-wait" ''
STATUS_FILES="/media/internal/backups-pub-solar/status" STATUS_FILES="/media/internal/backups-pub-solar/status"
@ -42,7 +42,7 @@ in {
systemd.timers."shutdown-after-backup" = { systemd.timers."shutdown-after-backup" = {
enable = true; enable = true;
timerConfig = { timerConfig = {
OnCalendar = "*-*-* 03..09:30:00 Etc/UTC"; OnCalendar = "*-*-* 03..09:*/15:00 Etc/UTC";
}; };
wantedBy = ["timers.target"]; wantedBy = ["timers.target"];
partOf = ["shutdown-after-backup.service"]; partOf = ["shutdown-after-backup.service"];