Last active
November 29, 2021 06:53
-
-
Save ShockwaveNN/c06e245e4906a707b3733990518a47f0 to your computer and use it in GitHub Desktop.
rastberry pi initial setup for rasbian os
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
KODI_BACKUP_FILE='' | |
echo 'gpu_mem=256' | sudo tee -a /boot/config.txt | |
sudo raspi-config nonint do_boot_wait 0 | |
# Restore kodi backup | |
sudo mkdir -pv /media/routher_share | |
echo '//192.168.1.1/HomeSamba /media/routher_share cifs rw,username=guest,password=,noperm,iocharset=utf8,file_mode=0777,dir_mode=0777,vers=1.0 00' | sudo tee -a /etc/fstab | |
sudo mount -a | |
cp "/media/routher_share/Backup/kodi/$KODI_BACKUP_FILE" ~/ | |
tar xvzf ~/"$KODI_BACKUP_FILE" -C / | |
rm -rf ~/"$KODI_BACKUP_FILE" | |
sudo apt -y update | |
sudo apt -y dist-upgrade | |
sudo apt -y autoremove | |
sudo apt -y install kodi vim | |
mkdir -pv ~/bin | |
wget -O ~/bin/kodi_backup.sh https://gist.githubusercontent.com/ShockwaveNN/e172b717242d8f3e6b036b0c08a3b0b7/raw/ | |
chmod +x ~/bin/kodi_backup.sh | |
(crontab -l ; echo "@reboot kodi --standalone") | crontab - | |
(crontab -l ; echo "0 4 * * * bash /home/pi/bin/kodi_backup.sh") | crontab - | |
sudo apt -y purge chromium-browser libpython3.7-dev libpython2.7-dev pypy | |
sudo apt -y autoremove --purge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment