Added drive cleanup to the upgrade process
This commit is contained in:
@@ -142,6 +142,40 @@ if [ $? -eq 0 ]; then
|
||||
REBOOT=true
|
||||
fi
|
||||
|
||||
# Install our logrotate config
|
||||
cp ./scripts/bbctrl-logrotate /etc/logrotate.d/bbctrl
|
||||
chown root:root /etc/logrotate.d/bbctrl
|
||||
|
||||
##########################################
|
||||
# Begin one-time cleanup tasks for 1.0.7
|
||||
##########################################
|
||||
|
||||
# Delete the entire local Chromium configuration. Start clean.
|
||||
rm -rf /home/pi/.config/chromium
|
||||
|
||||
# Get rid of some old files that were left behind
|
||||
rm -rf /home/pi/hostinfo.txt
|
||||
rm -rf /home/pi/ssidinfo.txt
|
||||
rm -rf /home/bbmc/bbctrl-1.0.0.tar.bz2
|
||||
rm -rf /home/bbmc/hostinfo.sh
|
||||
rm -rf /home/bbmc/index.html
|
||||
rm -rf /home/bbmc/favicon.ico
|
||||
|
||||
# Force a logrotate to get everything into a known state
|
||||
logrotate -f /etc/logrotate.conf
|
||||
|
||||
# Clean up the log directory - get rid of everything old
|
||||
rm -rf /var/log/*.gz
|
||||
rm -rf /var/log/*.1
|
||||
rm -rf /var/log/*.old
|
||||
rm -rf /var/log/bbctrl.2019*.install
|
||||
rm -rf /var/log/bbctrl.2020*.install
|
||||
rm -rf /var/log/bbctrl.log.*
|
||||
|
||||
##########################################
|
||||
# End one-time cleanup tasks for 1.0.7
|
||||
##########################################
|
||||
|
||||
sync
|
||||
|
||||
if $REBOOT; then
|
||||
|
||||
Reference in New Issue
Block a user