1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-09-11 15:08:33 +01:00

nixos/restic: use postStop for backupCleanupCommand

That way the `backupCleanupCommand` can also run when the backup service
failed for some reason.

Fixes: #182089.
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This commit is contained in:
Otavio Salvador 2022-07-25 11:53:01 -03:00
parent 4385533655
commit 7e8e00d656

View file

@ -312,7 +312,7 @@ in
''}
'';
} // optionalAttrs (backup.dynamicFilesFrom != null || backup.backupCleanupCommand != null) {
postStart = ''
postStop = ''
${optionalString (backup.backupCleanupCommand != null) ''
${pkgs.writeScript "backupCleanupCommand" backup.backupCleanupCommand}
''}