Merge pull request #218718 from KoviRobi/atop-service-no-previous-logs

nixos/atop: Don't choke if no existing atop logs
This commit is contained in:
7c6f434c 2023-03-06 20:27:25 +00:00 committed by GitHub
commit c5b8a7f55b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -142,6 +142,7 @@ in
# convert remainings logs and start eventually
atop.serviceConfig.ExecStartPre = pkgs.writeShellScript "atop-update-log-format" ''
set -e -u
shopt -s nullglob
for logfile in "$LOGPATH"/atop_*
do
${atop}/bin/atopconvert "$logfile" "$logfile".new