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:
commit
c5b8a7f55b
1 changed files with 1 additions and 0 deletions
|
@ -142,6 +142,7 @@ in
|
||||||
# convert remainings logs and start eventually
|
# convert remainings logs and start eventually
|
||||||
atop.serviceConfig.ExecStartPre = pkgs.writeShellScript "atop-update-log-format" ''
|
atop.serviceConfig.ExecStartPre = pkgs.writeShellScript "atop-update-log-format" ''
|
||||||
set -e -u
|
set -e -u
|
||||||
|
shopt -s nullglob
|
||||||
for logfile in "$LOGPATH"/atop_*
|
for logfile in "$LOGPATH"/atop_*
|
||||||
do
|
do
|
||||||
${atop}/bin/atopconvert "$logfile" "$logfile".new
|
${atop}/bin/atopconvert "$logfile" "$logfile".new
|
||||||
|
|
Loading…
Reference in a new issue