summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2020-04-22 13:31:39 +0200
committerRamón M. Gómez <ramongomez@us.es>2020-04-22 13:31:39 +0200
commitc3e4ff16fe3448515acf529fb5f0f371e748b00a (patch)
treeb0c685eb83ad5e02168fedd86286bd89de4e013e /installer
parentb77345f7604c02dfd16a6b63cc9e9efa114f0b55 (diff)
#972: Remove cron job definition from the default file; then updater checks if service code has changed to restart it automatically.
Diffstat (limited to 'installer')
-rwxr-xr-xinstaller/opengnsys_update.sh30
1 files changed, 13 insertions, 17 deletions
diff --git a/installer/opengnsys_update.sh b/installer/opengnsys_update.sh
index 0d613946..38f8069c 100755
--- a/installer/opengnsys_update.sh
+++ b/installer/opengnsys_update.sh
@@ -1198,25 +1198,12 @@ function updateSummary()
echo "========================"
echoAndLog "Project version: $VERSION"
echoAndLog "Update log file: $LOG_FILE"
- if [ -n "$NEWFILES" ]; then
- echoAndLog "Check new config files: $(echo $NEWFILES)"
- fi
- if [ -n "$NEWSERVICES" ]; then
- echoAndLog "New compiled services: $(echo $NEWSERVICES)"
- # Indicar si se debe reiniciar servicios manualmente o usando el Cron.
- [ -f /etc/default/opengnsys ] && source /etc/default/opengnsys
- if [ "$RUN_CRONJOB" == "no" ]; then
- echoAndLog " WARNING: you must to restart OpenGnsys services manually"
- else
- echoAndLog " New OpenGnsys services will be restarted by the cronjob"
- fi
- fi
+ [ "$NEWFILES" ] && echoAndLog "Check new config files: $(echo $NEWFILES)"
+ [ "$NEWSERVICES" ] && echoAndLog "New compiled services: $(echo $NEWSERVICES)"
echoAndLog "Warnings:"
echoAndLog " - You must to clear web browser cache before loading OpenGnsys page"
echoAndLog " - Run \"settoken\" script to update authentication tokens"
- if [ -n "$INSTALLEDOGLIVE" ]; then
- echoAndLog " - Installed new ogLive Client: $INSTALLEDOGLIVE"
- fi
+ [ "$INSTALLEDOGLIVE" ] && echoAndLog " - Installed new ogLive Client: $INSTALLEDOGLIVE"
echoAndLog " - If you want to use BURG as boot manager, run following command as root:"
echoAndLog " curl $DOWNLOADURL/burg.tgz -o $INSTALL_TARGET/client/lib/burg.tgz"
@@ -1325,7 +1312,16 @@ updateDownloadableFiles
makeDoxygenFiles
# Recompilar y actualizar los servicios del sistema
-compileServices
+if compileServices; then
+ # Restart services, if necessary.
+ if [ "$NEWSERVICES" ]; then
+ echoAndLog "Restarting OpenGnsys services"
+ service="opengnsys" $STARTSERVICE
+ fi
+else
+ errorAndLog "Error compiling OpenGnsys services"
+ exit 1
+fi
# Actaulizar ficheros auxiliares del cliente
updateClient