diff --git a/build.sdcard/raspbianStretchDesktop.sh b/build.sdcard/raspbianStretchDesktop.sh index 3a1a473..5109199 100644 --- a/build.sdcard/raspbianStretchDesktop.sh +++ b/build.sdcard/raspbianStretchDesktop.sh @@ -589,8 +589,7 @@ if [ "${baseImage}" = "raspbian" ]; then display_rotate=3 dtoverlay=i2c-gpio,i2c_gpio_scl=24,i2c_gpio_sda=23 - EOF - init 6 fi -fi -EOF \ No newline at end of file +EOF + init 6 +fi \ No newline at end of file diff --git a/home.admin/40addHDD.sh b/home.admin/40addHDD.sh index 0e5e5ff..1dff702 100755 --- a/home.admin/40addHDD.sh +++ b/home.admin/40addHDD.sh @@ -42,25 +42,19 @@ if [ ${existsHDD} -gt 0 ]; then sudo mount -a mountOK=$(df | grep -c /mnt/hdd) if [ ${mountOK} -eq 1 ]; then - echo "OK - HDD is mounted" echo "" - # 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 - configFile="/mnt/hdd/raspiblitz.conf" - echo "# RASPIBLITZ CONFIG FILE" > $configFile - echo "raspiBlitzVersion='${codeVersion}'" >> $configFile - echo "network=${network}" >> $configFile - echo "chain=${chain}" >> $configFile - echo "hostname=${hostname}" >> $configFile - sudo chmod 777 ${configFile} - echo "OK" - echo "" - fi + # init the RASPIBLITZ Config + source /home/admin/_version.info + configFile="/mnt/hdd/raspiblitz.conf" + sudo touch $configFile + sudo chmod 777 ${configFile} + echo "# RASPIBLITZ CONFIG FILE" > $configFile + echo "raspiBlitzVersion='${codeVersion}'" >> $configFile + echo "network=${network}" >> $configFile + echo "chain=${chain}" >> $configFile + echo "hostname=${hostname}" >> $configFile # move SSH pub keys to HDD so that they survive an update echo "moving SSH pub keys to HDD"