Fix shutdown units
This commit is contained in:
parent
d76c82bcbc
commit
99994a67b1
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
shutdownWaitMinutes = 15;
|
shutdownWaitMinutes = 15;
|
||||||
shutdownScript = pkgs.writeScript "shutdown" ''
|
shutdownScript = pkgs.writeShellScriptBin "shutdown-wait" ''
|
||||||
STATUS_FILES="/media/internal/backups-pub-solar/status"
|
STATUS_FILES="/media/internal/backups-pub-solar/status"
|
||||||
|
|
||||||
running=""
|
running=""
|
||||||
|
@ -37,7 +37,8 @@ in
|
||||||
systemd.services."shutdown-after-backup" = {
|
systemd.services."shutdown-after-backup" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = shutdownScript;
|
ExecStart = "${shutdownScript}/bin/shutdown-wait";
|
||||||
|
Type = "oneshot";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -47,5 +48,6 @@ in
|
||||||
OnCalendar = "3..9:*";
|
OnCalendar = "3..9:*";
|
||||||
};
|
};
|
||||||
wantedBy = [ "timers.target" ];
|
wantedBy = [ "timers.target" ];
|
||||||
|
partOf = [ "shutdown-after-backup.service" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue