mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-24 21:26:59 +01:00
Backup fix: touch backup-ok in post hook
This commit is contained in:
parent
5e140baa51
commit
d46bcbbad1
1 changed files with 8 additions and 6 deletions
|
|
@ -29,11 +29,7 @@ in {
|
|||
|
||||
postHook = mkOption {
|
||||
type = types.lines;
|
||||
default = ''
|
||||
if [ $exitStatus -eq 0 ]; then
|
||||
touch /nix/var/data/backup/backup-ok
|
||||
fi
|
||||
'';
|
||||
default = "";
|
||||
};
|
||||
|
||||
startAt = mkOption {
|
||||
|
|
@ -65,7 +61,13 @@ in {
|
|||
};
|
||||
readWritePaths = cfg.readWritePaths;
|
||||
preHook = cfg.preHook;
|
||||
postHook = cfg.postHook;
|
||||
postHook = ''
|
||||
${cfg.postHook}
|
||||
if [ $exitStatus -eq 0 ]; then
|
||||
touch /nix/var/data/backup/backup-ok
|
||||
fi
|
||||
'';
|
||||
|
||||
environment = { BORG_RSH = "ssh -i ${cfg.sshKey}"; };
|
||||
compression = "lz4";
|
||||
startAt = cfg.startAt;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue