Merge pull request #213301 from bcc32/atop-dont-leave-new-log-files

nixos/atop: Remove upgraded logfiles if not replaced
This commit is contained in:
7c6f434c 2023-03-13 20:20:40 +00:00 committed by GitHub
commit f7eeb48523
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,6 +151,8 @@ in
if ! ${pkgs.diffutils}/bin/cmp -s "$logfile" "$logfile".new
then
${pkgs.coreutils}/bin/mv -v -f "$logfile".new "$logfile"
else
${pkgs.coreutils}/bin/rm -f "$logfile".new
fi
done
'';