Bugfix and add another file to cleaning list
This commit is contained in:
parent
6123b9ac01
commit
a0a49416e0
@ -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
|
||||
|
||||
@ -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/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user