diff --git a/mycodo/mycodo_flask/utils/utils_settings.py b/mycodo/mycodo_flask/utils/utils_settings.py index faf64444e..f47701554 100644 --- a/mycodo/mycodo_flask/utils/utils_settings.py +++ b/mycodo/mycodo_flask/utils/utils_settings.py @@ -2044,7 +2044,7 @@ def settings_diagnostic_upgrade_master(): error, action, url_for('routes_settings.settings_diagnostic')) return finally: - command = '/bin/bash {path}/mycodo/scripts/upgrade_commands.sh web-server-reload'.format( + command = '/bin/bash {path}/mycodo/scripts/upgrade_commands.sh web-server-restart'.format( path=INSTALL_DIRECTORY) subprocess.Popen(command, shell=True) diff --git a/mycodo/scripts/upgrade_commands.sh b/mycodo/scripts/upgrade_commands.sh index d72410dae..8d4a01c0f 100755 --- a/mycodo/scripts/upgrade_commands.sh +++ b/mycodo/scripts/upgrade_commands.sh @@ -92,7 +92,6 @@ Options: upgrade-master Upgrade Mycodo to the master branch at https://github.com/kizniche/Mycodo upgrade-post Execute post-upgrade script web-server-connect Attempt to connect to the web server - web-server-reload Reload the web server web-server-restart Restart the web server web-server-disable Disable the web server service web-server-enable Enable the web server service @@ -686,21 +685,13 @@ case "${1:-''}" in printf "#### Trying again...\n" done ;; - 'web-server-reload') + 'web-server-restart') printf "\n#### Restarting nginx\n" service nginx restart sleep 5 printf "#### Reloading mycodoflask\n" service mycodoflask reload ;; - 'web-server-restart') - printf "\n#### Restarting nginx\n" - service nginx restart - sleep 5 - printf "#### Restarting mycodoflask\n" - service mycodoflask restart - sleep 5 - ;; 'web-server-disable') printf "\n#### Disabling service for nginx web server\n" systemctl disable mycodoflask.service diff --git a/mycodo/scripts/upgrade_post.sh b/mycodo/scripts/upgrade_post.sh index c76ef467b..77a0d0960 100755 --- a/mycodo/scripts/upgrade_post.sh +++ b/mycodo/scripts/upgrade_post.sh @@ -108,9 +108,9 @@ TIMER_START_restart_daemon=$SECONDS ${INSTALL_CMD} restart-daemon TIMER_TOTAL_restart_daemon=$((SECONDS - TIMER_START_restart_daemon)) -TIMER_START_web_server_reload=$SECONDS -${INSTALL_CMD} web-server-reload -TIMER_TOTAL_web_server_reload=$((SECONDS - TIMER_START_web_server_reload)) +TIMER_START_web_server_restart=$SECONDS +${INSTALL_CMD} web-server-restart +TIMER_TOTAL_web_server_restart=$((SECONDS - TIMER_START_web_server_restart)) TIMER_START_web_server_connect=$SECONDS ${INSTALL_CMD} web-server-connect @@ -135,5 +135,5 @@ printf "\ncompile-translations: %s s" "${TIMER_TOTAL_compile_translation printf "\ngenerate-widget-html: %s s" "${TIMER_TOTAL_generate_widget_html}" printf "\nupdate-permissions: %s s" "${TIMER_TOTAL_update_permissions}" printf "\nrestart-daemon: %s s" "${TIMER_TOTAL_restart_daemon}" -printf "\nweb-server_reload: %s s" "${TIMER_TOTAL_web_server_reload}" +printf "\nweb-server_restart: %s s" "${TIMER_TOTAL_web_server_restart}" printf "\nweb-server-connect: %s s\n" "${TIMER_TOTAL_web_server_connect}"