fix email notification, again
This commit is contained in:
parent
2b4b5b9176
commit
ff765d3d2e
1 changed files with 12 additions and 10 deletions
|
@ -98,7 +98,8 @@ in {
|
||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
requires = [ "postgresql.service" ];
|
requires = [ "postgresql.service" ];
|
||||||
|
|
||||||
unitConfig.OnFailure = ''
|
unitConfig.OnFailure = let
|
||||||
|
script = pkgs.writeScript "misskey-backup-failure" ''
|
||||||
invocationId="$(systemctl show --value -p InvocationID misskey-backup.service)"
|
invocationId="$(systemctl show --value -p InvocationID misskey-backup.service)"
|
||||||
logs="$(journalctl _SYSTEMD_INVOCATION_ID= -u misskey-backup.service)"
|
logs="$(journalctl _SYSTEMD_INVOCATION_ID= -u misskey-backup.service)"
|
||||||
|
|
||||||
|
@ -111,6 +112,7 @@ in {
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
'';
|
'';
|
||||||
|
in "${script}";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.timers.misskey-backup = { timerConfig.Persistent = true; };
|
systemd.timers.misskey-backup = { timerConfig.Persistent = true; };
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue