Skip to content

Commit 9e2c144

Browse files
committed
Change mycodoflask reload to restart
1 parent 14e5267 commit 9e2c144

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

mycodo/mycodo_flask/utils/utils_settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2044,7 +2044,7 @@ def settings_diagnostic_upgrade_master():
20442044
error, action, url_for('routes_settings.settings_diagnostic'))
20452045
return
20462046
finally:
2047-
command = '/bin/bash {path}/mycodo/scripts/upgrade_commands.sh web-server-reload'.format(
2047+
command = '/bin/bash {path}/mycodo/scripts/upgrade_commands.sh web-server-restart'.format(
20482048
path=INSTALL_DIRECTORY)
20492049
subprocess.Popen(command, shell=True)
20502050

mycodo/scripts/upgrade_commands.sh

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ Options:
9292
upgrade-master Upgrade Mycodo to the master branch at https://github.com/kizniche/Mycodo
9393
upgrade-post Execute post-upgrade script
9494
web-server-connect Attempt to connect to the web server
95-
web-server-reload Reload the web server
9695
web-server-restart Restart the web server
9796
web-server-disable Disable the web server service
9897
web-server-enable Enable the web server service
@@ -686,21 +685,13 @@ case "${1:-''}" in
686685
printf "#### Trying again...\n"
687686
done
688687
;;
689-
'web-server-reload')
688+
'web-server-restart')
690689
printf "\n#### Restarting nginx\n"
691690
service nginx restart
692691
sleep 5
693692
printf "#### Reloading mycodoflask\n"
694693
service mycodoflask reload
695694
;;
696-
'web-server-restart')
697-
printf "\n#### Restarting nginx\n"
698-
service nginx restart
699-
sleep 5
700-
printf "#### Restarting mycodoflask\n"
701-
service mycodoflask restart
702-
sleep 5
703-
;;
704695
'web-server-disable')
705696
printf "\n#### Disabling service for nginx web server\n"
706697
systemctl disable mycodoflask.service

mycodo/scripts/upgrade_post.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ TIMER_START_restart_daemon=$SECONDS
108108
${INSTALL_CMD} restart-daemon
109109
TIMER_TOTAL_restart_daemon=$((SECONDS - TIMER_START_restart_daemon))
110110

111-
TIMER_START_web_server_reload=$SECONDS
112-
${INSTALL_CMD} web-server-reload
113-
TIMER_TOTAL_web_server_reload=$((SECONDS - TIMER_START_web_server_reload))
111+
TIMER_START_web_server_restart=$SECONDS
112+
${INSTALL_CMD} web-server-restart
113+
TIMER_TOTAL_web_server_restart=$((SECONDS - TIMER_START_web_server_restart))
114114

115115
TIMER_START_web_server_connect=$SECONDS
116116
${INSTALL_CMD} web-server-connect
@@ -135,5 +135,5 @@ printf "\ncompile-translations: %s s" "${TIMER_TOTAL_compile_translation
135135
printf "\ngenerate-widget-html: %s s" "${TIMER_TOTAL_generate_widget_html}"
136136
printf "\nupdate-permissions: %s s" "${TIMER_TOTAL_update_permissions}"
137137
printf "\nrestart-daemon: %s s" "${TIMER_TOTAL_restart_daemon}"
138-
printf "\nweb-server_reload: %s s" "${TIMER_TOTAL_web_server_reload}"
138+
printf "\nweb-server_restart: %s s" "${TIMER_TOTAL_web_server_restart}"
139139
printf "\nweb-server-connect: %s s\n" "${TIMER_TOTAL_web_server_connect}"

0 commit comments

Comments
 (0)