2021-02-10 11:59:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
# based on https://github.com/rootzoll/raspiblitz/blob/v1.6/home.admin/XXprepareRelease.sh
|
|
|
|
|
|
|
|
|
|
# Run this script once after a fresh sd card build
|
|
|
|
|
# to prepare the image for release as a downloadable sd card image
|
|
|
|
|
|
2021-02-10 18:50:23 +00:00
|
|
|
# SSH authorized keys
|
|
|
|
|
echo "# Deleting SSH authorized_keys ..."
|
|
|
|
|
sudo rm /root/.ssh/authorized_keys
|
|
|
|
|
echo "# OK"
|
|
|
|
|
|
2021-02-10 11:59:59 +00:00
|
|
|
# SSH Pubkeys (make unique for every sd card image install)
|
2021-02-10 18:50:23 +00:00
|
|
|
echo "# Deleting SSH Pub keys ..."
|
|
|
|
|
echo "they will get recreated on fresh bootup, by the bootstrap.service"
|
2021-02-10 11:59:59 +00:00
|
|
|
sudo rm /etc/ssh/ssh_host_*
|
2021-02-10 18:50:23 +00:00
|
|
|
echo "# OK"
|
2021-02-10 11:59:59 +00:00
|
|
|
|
|
|
|
|
# https://github.com/rootzoll/raspiblitz/issues/1068#issuecomment-599267503
|
|
|
|
|
echo
|
2021-02-10 18:50:23 +00:00
|
|
|
echo "# Deleting local DNS confs ..."
|
2021-02-10 11:59:59 +00:00
|
|
|
sudo rm /etc/resolv.conf
|
2021-02-10 18:50:23 +00:00
|
|
|
echo "# OK"
|
2021-02-10 11:59:59 +00:00
|
|
|
|
|
|
|
|
# https://github.com/rootzoll/raspiblitz/issues/1371
|
|
|
|
|
echo
|
2021-02-10 18:50:23 +00:00
|
|
|
echo "# Deleting local WIFI conf ..."
|
2021-02-10 11:59:59 +00:00
|
|
|
sudo rm /boot/wpa_supplicant.conf 2>/dev/null
|
2021-02-10 18:50:23 +00:00
|
|
|
echo "# OK"
|
2021-02-10 11:59:59 +00:00
|
|
|
|
|
|
|
|
echo
|
2021-02-10 18:50:23 +00:00
|
|
|
echo "# Will shutdown now."
|
|
|
|
|
echo "# Wait until the SBC LEDs show no activity anymore."
|
|
|
|
|
echo "# Then remove SD card and make a release image from it."
|
2021-02-10 11:59:59 +00:00
|
|
|
sudo shutdown now
|