delete older counters

This commit is contained in:
Alexander Khodyrev 2024-09-14 10:41:30 +03:00
parent 66c6903e94
commit a4b764ad52

View file

@ -52,6 +52,7 @@ in {
if ${pkgs.curl}/bin/curl http://localhost:${toString cfg.listenPort}/visits > visits-new.json; then
cp visits-new.json "$(date +"%Y-%m-%d-%H-%M").json"
mv visits-new.json visits.json
${pkgs.findutils}/bin/find . -ctime +10 -delete
fi
'';
serviceConfig = {