Bugfix and add another file to cleaning list

This commit is contained in:
Igor Pečovnik 2018-06-17 13:07:02 +00:00
parent 6123b9ac01
commit a0a49416e0
2 changed files with 2 additions and 1 deletions

View File

@ -79,6 +79,7 @@ create_board_package()
[ -f "/etc/cron.daily/log2ram" ] && rm /etc/cron.daily/log2ram
[ -f "/etc/default/log2ram.dpkg-dist" ] && rm /etc/default/log2ram.dpkg-dist
[ -f "/etc/init.d/armhwinfo" ] && rm /etc/init.d/armhwinfo
[ -f "/etc/logrotate.d/armhwinfo" ] && rm /etc/logrotate.d/armhwinfo
[ -f "/etc/init.d/firstrun" ] && rm /etc/init.d/firstrun
[ -f "/etc/init.d/resize2fs" ] && rm /etc/init.d/resize2fs
[ -f "/lib/systemd/system/firstrun-config.service" ] && rm /lib/systemd/system/firstrun-config.service

View File

@ -13,7 +13,7 @@ treshold=75 # %
logusage=$(df /var/log/ --output=pcent | tail -1 |cut -d "%" -f 1)
if [ $logusage -ge $treshold ]; then
# write to SD
/usr/sbin/armbian/armbian-ramlog write >/dev/null 2>&1
/usr/lib/armbian/armbian-ramlog write >/dev/null 2>&1
# rotate logs on "disk"
chown root.root -R /var/log.hdd
logrotate --force /etc/logrotate.d/