mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
39 lines
1.1 KiB
Bash
Executable file
39 lines
1.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Just run this script once after a fresh sd card build
|
|
# to prepare the image for release as a downloadable sd card image
|
|
|
|
# raspiblitz.info & logs
|
|
echo "cleaning raspiblitz info .."
|
|
source /home/admin/raspiblitz.info
|
|
echo "baseimage=${baseimage}" > /home/admin/raspiblitz.info
|
|
echo "cpu=${cpu}" >> /home/admin/raspiblitz.info
|
|
echo "displayClass=${displayClass}" >> /home/admin/raspiblitz.info
|
|
echo "deleting raspiblitz logs .."
|
|
sudo rm /home/admin/*.log
|
|
echo "OK"
|
|
|
|
# SSH Pubkeys (make unique for every sd card image install)
|
|
echo ""
|
|
echo "deleting SSH Pub keys ..."
|
|
echo "they will get recreated on fresh bootup, by _bootstrap.sh service"
|
|
sudo rm /etc/ssh/ssh_host_*
|
|
echo "OK"
|
|
|
|
# https://github.com/rootzoll/raspiblitz/issues/1068#issuecomment-599267503
|
|
echo ""
|
|
echo "deleting local DNS confs ..."
|
|
sudo rm /etc/resolv.conf
|
|
echo "OK"
|
|
|
|
# https://github.com/rootzoll/raspiblitz/issues/1371
|
|
echo ""
|
|
echo "deleting local WIFI conf ..."
|
|
sudo rm /boot/wpa_supplicant.conf 2>/dev/null
|
|
echo "OK"
|
|
|
|
echo " "
|
|
echo "Will shutdown now."
|
|
echo "Wait until Raspberry LEDs show no activity anymore."
|
|
echo "Then remove SD card and make an release image from it."
|
|
sudo shutdown now
|