mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-29 04:52:32 +02:00
dont overwrite raspiblitz.conf on update
This commit is contained in:
@@ -42,10 +42,14 @@ if [ ${existsHDD} -gt 0 ]; then
|
|||||||
sudo mount -a
|
sudo mount -a
|
||||||
mountOK=$(df | grep -c /mnt/hdd)
|
mountOK=$(df | grep -c /mnt/hdd)
|
||||||
if [ ${mountOK} -eq 1 ]; then
|
if [ ${mountOK} -eq 1 ]; then
|
||||||
|
|
||||||
echo "OK - HDD is mounted"
|
echo "OK - HDD is mounted"
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# init the RASPIBLITZ Config
|
# init the RASPIBLITZ Config (if not exist on provision)
|
||||||
|
configExists=$(sudo ls /mnt/hdd/raspiblitz.conf | grep -c 'raspiblitz.conf')
|
||||||
|
if [ ${configExists} -eq 0 ]; then
|
||||||
|
echo "Creating raspiblitz.conf on HDD"
|
||||||
source /home/admin/_version.info
|
source /home/admin/_version.info
|
||||||
configFile="/mnt/hdd/raspiblitz.conf"
|
configFile="/mnt/hdd/raspiblitz.conf"
|
||||||
echo "# RASPIBLITZ CONFIG FILE" > $configFile
|
echo "# RASPIBLITZ CONFIG FILE" > $configFile
|
||||||
@@ -54,6 +58,9 @@ if [ ${existsHDD} -gt 0 ]; then
|
|||||||
echo "chain=${chain}" >> $configFile
|
echo "chain=${chain}" >> $configFile
|
||||||
echo "hostname=${hostname}" >> $configFile
|
echo "hostname=${hostname}" >> $configFile
|
||||||
sudo chmod 777 ${configFile}
|
sudo chmod 777 ${configFile}
|
||||||
|
echo "OK"
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
|
|
||||||
# move SSH pub keys to HDD so that they survive an update
|
# move SSH pub keys to HDD so that they survive an update
|
||||||
echo "moving SSH pub keys to HDD"
|
echo "moving SSH pub keys to HDD"
|
||||||
|
Reference in New Issue
Block a user