Merge branch '1.0.7-devel' into fix-offline-install

This commit is contained in:
OneFinityCNC
2021-03-10 13:14:13 -05:00
committed by GitHub
16 changed files with 248 additions and 54 deletions

View File

@@ -93,7 +93,9 @@ if [ $? -ne 0 ]; then
REBOOT=true
fi
# Install xinitrc
# Install .Xresources & .xinitrc
cp scripts/Xresources ~pi/.Xresources
chown pi:pi ~pi/.Xresources
cp scripts/xinitrc ~pi/.xinitrc
chmod +x ~pi/.xinitrc
chown pi:pi ~pi/.xinitrc
@@ -133,6 +135,54 @@ if $UPDATE_PY; then
chmod 777 $HTTP_DIR
fi
# Expand the file system if necessary
chmod +x ./scripts/resize_root_fs.sh
./scripts/resize_root_fs.sh
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
# Ensure logrotate runs on every boot (for systems with no network, thus bad clock)
if [ ! -e /etc/cron.d/reboot ]; then
cp ./scripts/cron_d_reboot /etc/cron.d/reboot
mkdir -p /etc/cron.reboot
cp ./scripts/cron_reboot_logrotate /etc/cron.reboot/logrotate
fi
##########################################
# 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