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 | |
parent | b77345f7604c02dfd16a6b63cc9e9efa114f0b55 (diff) |
#972: Remove cron job definition from the default file; then updater checks if service code has changed to restart it automatically.
-rw-r--r-- | admin/Sources/Services/opengnsys.default | 2 | ||||
-rwxr-xr-x | installer/opengnsys_update.sh | 30 |
2 files changed, 13 insertions, 19 deletions
diff --git a/admin/Sources/Services/opengnsys.default b/admin/Sources/Services/opengnsys.default index c0196537..d7376cf1 100644 --- a/admin/Sources/Services/opengnsys.default +++ b/admin/Sources/Services/opengnsys.default @@ -7,11 +7,9 @@ # 8 for Admin Server or Repo without Torrent # 0 for Admin Server and Repo with Torrent # -8 for Repo with Torrent -# RUN_CRON run Cron script to check started processes RUN_OGADMSERVER="yes" RUN_OGADMREPO="yes" RUN_OGADMAGENT="yes" RUN_BTTRACKER="yes" RUN_BTSEEDER="yes" BTSEEDER_PRIORITY=0 -RUN_CRONJOB="yes" 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 |