Add restart timer to update container image
This commit is contained in:
parent
5425a5fac6
commit
27ebfe4fae
1 changed files with 21 additions and 0 deletions
|
|
@ -79,6 +79,27 @@ in
|
|||
'';
|
||||
};
|
||||
|
||||
systemd.services.wekan-restart = {
|
||||
description = "Restart Wekan services.";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
script = ''
|
||||
${pkgs.systemd}/bin/systemctl restart "podman-${databaseName}.service" "podman-${serviceName}.service"
|
||||
'';
|
||||
};
|
||||
|
||||
systemd.timers.wekan-restart = {
|
||||
description = "Restart wekan containers";
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
Persistent = true;
|
||||
OnCalendar = "*-*-* 04:00:00";
|
||||
Unit = "wekan-restart.service";
|
||||
};
|
||||
};
|
||||
|
||||
system.activationScripts.makeWekanDirectories = lib.stringAfter [ "var" ] ''
|
||||
mkdir -p "${directories.db}"
|
||||
mkdir -p "${directories.dbDump}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue