setup: reflect the fact that the operator should restart the server
authorArt Cancro <ajc@citadel.org>
Thu, 31 Aug 2023 21:00:12 +0000 (12:00 -0900)
committerArt Cancro <ajc@citadel.org>
Thu, 31 Aug 2023 21:00:12 +0000 (12:00 -0900)
citadel/utils/setup.c

index 84d1d958ca8d94283160e5fca20d4f89e53c0985..28f44798ed14fbfe62cd68766ddaf4ec0df97d36 100644 (file)
@@ -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;