From: Art Cancro Date: Thu, 31 Aug 2023 21:00:12 +0000 (-0900) Subject: setup: reflect the fact that the operator should restart the server X-Git-Tag: v989~3 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=c7589e995080a55e55c587d65c85a5889beb4194 setup: reflect the fact that the operator should restart the server --- diff --git a/citadel/utils/setup.c b/citadel/utils/setup.c index 84d1d958c..28f44798e 100644 --- a/citadel/utils/setup.c +++ b/citadel/utils/setup.c @@ -654,9 +654,8 @@ void unused_messages(void) { _("Setup is finished, but the Citadel server failed to start.\n" "Go back and check your configuration.\n") ); - important_message(_("Setup finished"), - _("Setup is finished. You may now start the server.") - ); + display_error(_("Restarting Citadel server to apply changes")); + display_error(_("Setup failed to restart Citadel server. Please restart it manually.")); } @@ -813,52 +812,9 @@ int main(int argc, char *argv[]) { check_xinetd_entry(); // Check /etc/xinetd.d/telnet - // Restart citserver - activity = _("Restarting Citadel server to apply changes"); - progress(activity, 0, 51); - - serv_puts("TIME"); - serv_gets(buf); - long original_start_time = extract_long(&buf[4], 3); - - progress(activity, 1, 51); - serv_puts("DOWN 1"); - progress(activity, 2, 51); - serv_gets(buf); - if (buf[0] != '2') { - display_error("%s\n", buf); - exit(6); - } - - close(serv_sock); - serv_sock = (-1); - - for (i=3; i<=6; ++i) { // wait for server to shut down - progress(activity, i, 51); - sleep(1); - } - - for (i=7; ((i<=48) && (serv_sock < 0)) ; ++i) { // wait for server to start up - progress(activity, i, 51); - serv_sock = uds_connectsock(file_citadel_admin_socket); - sleep(1); - } - - progress(activity, 49, 51); - serv_gets(buf); - - progress(activity, 50, 51); - serv_puts("TIME"); - serv_gets(buf); - long new_start_time = extract_long(&buf[4], 3); - - close(serv_sock); - progress(activity, 51, 51); - - if ((original_start_time == new_start_time) || (new_start_time <= 0)) { - display_error("%s\n", _("Setup failed to restart Citadel server. Please restart it manually.")); - exit(7); - } + important_message(_("Setup finished"), + _("Setup is finished. You may now start the server.") + ); exit(0); return 0;