#1039 set new version in config on update

This commit is contained in:
rootzoll
2020-02-19 12:28:12 +01:00
parent f890c2575e
commit aec033b468
2 changed files with 3 additions and 1 deletions

View File

@@ -13,7 +13,7 @@ lndAddress=''
lndPort='9735' lndPort='9735'
network=bitcoin network=bitcoin
publicIP='1.2.3.4' publicIP='1.2.3.4'
raspiBlitzVersion='1.3' raspiBlitzVersion='1.4'
rtlWebinterface=off rtlWebinterface=off
runBehindTor=off runBehindTor=off
touchscreen=1 touchscreen=1

View File

@@ -160,6 +160,8 @@ echo "Version Data: ${raspiBlitzVersion}" >> ${logFile}
if [ "${raspiBlitzVersion}" != "${codeVersion}" ]; then if [ "${raspiBlitzVersion}" != "${codeVersion}" ]; then
echo "detected version change ... starting migration script" >> ${logFile} echo "detected version change ... starting migration script" >> ${logFile}
echo "TODO: Update Migration check ... only needed after version 1.0" >> ${logFile} echo "TODO: Update Migration check ... only needed after version 1.0" >> ${logFile}
echo "OK Done - Updating version in config ..."
sudo sed -i "s/^raspiBlitzVersion=.*/raspiBlitzVersion='${codeVersion}'/g" ${configFile}
else else
echo "OK - version of config data is up to date" >> ${logFile} echo "OK - version of config data is up to date" >> ${logFile}
fi fi