fintic-tracker/03_update_boot_config.sh

26 lines
822 B
Bash

#!/bin/bash
# Disable onboard audio
sudo sed -i 's/dtparam=audio.*/dtparam=audio=off/g' /boot/config.txt
# Disable onboard bluetooth
echo "dtoverlay=disable-bt" | sudo tee -a /boot/config.txt
# Increase default temperature limit from 60C to 70C
echo "temp_soft_limit=70" | sudo tee -a /boot/config.txt
# Isolate (remove) CPU core 3 from kernel process scheduler
#? Is this just to run a little cooler?
sudo sed -i '$ s/$/ isolcpus=3/' /boot/cmdline.txt
# Enable ssh server on boot
sudo touch /boot/ssh.txt
# Disable hdmi output
sudo sed -i 's/exit 0//g' /etc/rc.local
echo "/usr/bin/tvservice -o" | sudo tee -a /etc/rc.local
echo "exit 0" | sudo tee -a /etc/rc.local
# Run startup script at reboot; Register to cron for pi user
echo "@reboot sudo -E bash $HOME/fintic/startup.sh &" | sudo tee -a /var/spool/cron/pi