hosts/plover: fix Gitea dump cleanup

This commit is contained in:
Gabriel Arazas 2023-07-01 16:29:29 +08:00
parent ef0d3d92cd
commit dd1b2b0638
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -115,7 +115,8 @@ in
# with 2 dumps.
systemd.services.gitea-dump.preStart = lib.mkAfter ''
${pkgs.findutils}/bin/find ${lib.escapeShellArg config.services.gitea.dump.backupDir} \
-mtime 14 -maxdepth 1 -type f -delete
-maxdepth 1 -type f -iname '*.${config.services.gitea.dump.type}' -ctime 21 \
| tail -n -3 | xargs rm
'';
# Making sure this plays nicely with the database service of choice. Take