restic: change service type from simple to oneshot

Fixes #6930
This commit is contained in:
Jess 2025-05-01 04:07:07 +12:00 committed by Austin Horstman
parent 7f301a4d96
commit 5f217e5a31
3 changed files with 17 additions and 1 deletions

View file

@ -397,7 +397,7 @@ in
Service =
{
Type = "simple";
Type = "oneshot";
X-RestartIfChanged = true;
RuntimeDirectory = serviceName;

View file

@ -106,6 +106,19 @@ in
"--keep-hourly 3"
];
};
prune-opts = {
inherit passwordFile paths exclude;
initialize = true;
repository = "/home/alice/repos/prune-opts";
pruneOpts = [
"--keep-yearly 4"
"--keep-monthly 3"
"--keep-weekly 2"
"--keep-daily 2"
"--keep-hourly 3"
];
};
};
};
}

View file

@ -268,6 +268,9 @@ in
assert int(actual) == 8, \
f"Expected a snapshot count of 8 but got {actual}"
with subtest("Prune opts"):
systemctl_succeed_as_alice("start restic-backups-prune-opts.service")
logout_alice()
'';
}