diff --git a/powerwall.sh b/powerwall.sh index bb27ad68..6576cf26 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -1245,7 +1245,7 @@ LOGROTATE(){ # sleep 5s # STARTALL_SERVICES - backupstokeep=(`ls -d ${PW_LOGARCHIVE}/* 2> /dev/null | sort -r | tail -2`) + backupstokeep=(`ls -d ${PW_LOGARCHIVE}/* 2> /dev/null | sort | tail -2`) for folder in $(ls -d ${PW_LOGARCHIVE}/* | sort -r); do echo -en "${folder} = " keep=0