diff options
author | Ramón M. Gómez <ramongomez@us.es> | 2020-04-22 13:31:39 +0200 |
---|---|---|
committer | Ramón M. Gómez <ramongomez@us.es> | 2020-04-22 13:31:39 +0200 |
commit | c3e4ff16fe3448515acf529fb5f0f371e748b00a (patch) | |
tree | b0c685eb83ad5e02168fedd86286bd89de4e013e /installer/opengnsys_update.sh | |
parent | b77345f7604c02dfd16a6b63cc9e9efa114f0b55 (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/opengnsys_update.sh')
-rwxr-xr-x | installer/opengnsys_update.sh | 30 |
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 |