#3267 repair hostname on recover/update (#4272)

This commit is contained in:
/rootzoll 2023-11-23 16:50:40 +01:00 committed by GitHub
parent 6a33cbc6dc
commit b402ee4c5f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,7 +46,13 @@ fi
# load old or init raspiblitz config
source ${configFile}
# check if config files contains basic: hostname
# if hostname missing - set default
if [ ${#hostname} -eq 0 ]; then
/home/admin/config.scripts/blitz.conf.sh set hostname "raspiblitz"
source ${configFile}
fi
# re-check if config files contains hostname value
if [ ${#hostname} -eq 0 ]; then
/home/admin/config.scripts/blitz.error.sh _provision.update.sh "missing-hostname" "${setupFile} or ${configFile} contains no hostname" "" ${logFile}
exit 1