summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2018-11-30 11:34:30 +0100
committerRamón M. Gómez <ramongomez@us.es>2018-11-30 11:34:30 +0100
commit3b8ef0d6e64fb2f540b8b44625d37c3ac58c2e04 (patch)
tree0f3077ab35a669b4ee24acaf6e9223ce3df329ac
parent07518803dbe5159cd639eb99023986c54dc7baa8 (diff)
#881: Add new variable definitions to the default file.
-rwxr-xr-xinstaller/opengnsys_update.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 75decd18..8b56b549 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -887,6 +887,18 @@ function updateServerFiles()
cp -a $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.init /etc/init.d/opengnsys
NEWFILES="$NEWFILES /etc/init.d/opengnsys"
fi
+ if ! diff -q $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.default /etc/default/opengnsys >/dev/null; then
+ echoAndLog "${FUNCNAME}(): updating new default file"
+ backupFile /etc/default/opengnsys
+ # Buscar si hay nuevos parámetros.
+ local var valor
+ while IFS="=" read -e var valor; do
+ [[ $var =~ ^# ]] || \
+ grep -q "^$var=" /etc/default/opengnsys || \
+ echo "$var=$valor" >> /etc/default/opengnsys
+ done < $WORKDIR/opengnsys/admin/Sources/Services/opengnsys.default
+ NEWFILES="$NEWFILES /etc/default/opengnsys"
+ fi
if egrep -q "(UrlMsg=.*msgbrowser.php)|(UrlMenu=http://)" $INSTALL_TARGET/client/etc/ogAdmClient.cfg 2>/dev/null; then
echoAndLog "${FUNCNAME}(): updating new client config file"
backupFile $INSTALL_TARGET/client/etc/ogAdmClient.cfg
@@ -1226,7 +1238,7 @@ checkFiles
# Mostrar resumen de actualización.
updateSummary
-#rm -rf $WORKDIR
+rm -rf $WORKDIR
echoAndLog "OpenGnsys update finished at $(date)"
popd