]> code.citadel.org Git - citadel.git/commitdiff
* Finished the setup program
authorArt Cancro <ajc@citadel.org>
Sun, 24 Aug 2003 03:31:50 +0000 (03:31 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 24 Aug 2003 03:31:50 +0000 (03:31 +0000)
* Bumped the internal version number to 5.01

webcit/ChangeLog
webcit/README.txt
webcit/setup.c
webcit/webcit.h

index 460e96ef36c38dbda5c1b2e89c4a008b87a8afce..51c6dd495bfbf516ef018978af880df07e45632a 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
 $Log$
+Revision 500.23  2003/08/24 03:31:50  ajc
+* Finished the setup program
+* Bumped the internal version number to 5.01
+
 Revision 500.22  2003/08/22 00:47:27  ajc
 * setup is now working, but it still needs a way to detect a running WebCit
 
 Revision 500.22  2003/08/22 00:47:27  ajc
 * setup is now working, but it still needs a way to detect a running WebCit
 
@@ -1574,3 +1578,4 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
+
index aaf944ae8c764ca12484d2d46ccb2992fc58835a..f9b164e0af6fb35c726a1e9aa1fb34a15e65471b 100644 (file)
@@ -1,5 +1,5 @@
                       WEBCIT for the Citadel/UX System
                       WEBCIT for the Citadel/UX System
-                               version 5.00
+                               version 5.01
  
    Copyright (C) 1996-2003 by the authors.  Portions written by:
        Art Cancro
  
    Copyright (C) 1996-2003 by the authors.  Portions written by:
        Art Cancro
@@ -53,7 +53,14 @@ can try it out.  Point your web browser to WebCit using a URL such as:
 want it to, you should set it up to be automatically started by the system at
 boot time.  The recommended way to do this is with an entry in /etc/inittab,
 because init can then automatically restart WebCit if it happens to crash for
 want it to, you should set it up to be automatically started by the system at
 boot time.  The recommended way to do this is with an entry in /etc/inittab,
 because init can then automatically restart WebCit if it happens to crash for
-any reason.  Open /etc/inittab and add an entry something like this:
+any reason.
+ The included "setup" program is basically just an installation helper that
+asks a series of questions and then adds the appropriate line to inittab to
+start WebCit.  For most installations, this will do just fine.  If you have
+special circumstances, or if you'd prefer to configure WebCit manually, you
+may skip the setup program.  Instead, open /etc/inittab and add an entry
+something like this:
  
  wc:2345:respawn:/usr/local/webcit/webserver
  
  
  wc:2345:respawn:/usr/local/webcit/webserver
  
index 18938e80a28b88dda92ab7a206d2879b93fe0046..9706bafceb2ac41b0b29b34a8a76d6d43a6dd3ca 100644 (file)
@@ -2,6 +2,8 @@
  * $Id$
  *
  * WebCit setup utility
  * $Id$
  *
  * WebCit setup utility
+ * 
+ * (This is basically just an install wizard.  It's not required.)
  *
  */
 
  *
  */
 
@@ -104,11 +106,11 @@ void shutdown_service(void) {
 
        strcpy(init_entry, "");
 
 
        strcpy(init_entry, "");
 
-       /* Determine the fully qualified path name of citserver */
-       snprintf(looking_for, sizeof looking_for, "%s/citserver ", WEBCITDIR);
+       /* Determine the fully qualified path name of webserver */
+       snprintf(looking_for, sizeof looking_for, "%s/webserver ", WEBCITDIR);
 
        /* Pound through /etc/inittab line by line.  Set have_entry to 1 if
 
        /* Pound through /etc/inittab line by line.  Set have_entry to 1 if
-        * an entry is found which we believe starts citserver.
+        * an entry is found which we believe starts webserver.
         */
        infp = fopen("/etc/inittab", "r");
        if (infp == NULL) {
         */
        infp = fopen("/etc/inittab", "r");
        if (infp == NULL) {
@@ -383,13 +385,13 @@ void check_inittab_entry(void)
        FILE *infp;
        char buf[SIZ];
        char looking_for[SIZ];
        FILE *infp;
        char buf[SIZ];
        char looking_for[SIZ];
-       char question[128];
+       char question[SIZ];
        char entryname[5];
        char listenport[128];
        char hostname[128];
        char portname[128];
 
        char entryname[5];
        char listenport[128];
        char hostname[128];
        char portname[128];
 
-       /* Determine the fully qualified path name of citserver */
+       /* Determine the fully qualified path name of webserver */
        snprintf(looking_for, sizeof looking_for, "%s/webserver ", WEBCITDIR);
 
        /* If there's already an entry, then we have nothing left to do. */
        snprintf(looking_for, sizeof looking_for, "%s/webserver ", WEBCITDIR);
 
        /* If there's already an entry, then we have nothing left to do. */
@@ -408,7 +410,7 @@ void check_inittab_entry(void)
        snprintf(question, sizeof question,
                "On which port do you want WebCit to listen for HTTP "
                "requests?\n\nYou can use the standard port (80) if you are "
        snprintf(question, sizeof question,
                "On which port do you want WebCit to listen for HTTP "
                "requests?\n\nYou can use the standard port (80) if you are "
-               "not running another web server\n(such as Apache), otherwise "
+               "not running another\nweb server (such as Apache), otherwise "
                "select another port.");
        sprintf(listenport, "2000");
        set_value(question, listenport);
                "select another port.");
        sprintf(listenport, "2000");
        set_value(question, listenport);
@@ -453,8 +455,9 @@ void check_inittab_entry(void)
                display_error(strerror(errno));
        } else {
                fprintf(infp, "# Start the WebCit server...\n");
                display_error(strerror(errno));
        } else {
                fprintf(infp, "# Start the WebCit server...\n");
-               fprintf(infp, "%s:2345:respawn:%s %s %s\n",
-                       entryname, looking_for, hostname, portname);
+               fprintf(infp, "%s:2345:respawn:%s -p%s %s %s\n",
+                       entryname, looking_for,
+                       listenport, hostname, portname);
                fclose(infp);
                strcpy(init_entry, entryname);
        }
                fclose(infp);
                strcpy(init_entry, entryname);
        }
@@ -463,18 +466,6 @@ void check_inittab_entry(void)
 
 
 
 
 
 
-/* 
- * Check to see if our server really works.  Returns 0 on success.
- */
-int test_server(void) {
-
-       return 0;               /* FIXME ... stubbed out */
-
-}
-
-
-
-
 /*
  * Figure out what type of user interface we're going to use
  */
 /*
  * Figure out what type of user interface we're going to use
  */
@@ -532,7 +523,7 @@ int main(int argc, char *argv[])
 
        /* Get started in a valid setup directory. */
        strcpy(setup_directory, WEBCITDIR);
 
        /* Get started in a valid setup directory. */
        strcpy(setup_directory, WEBCITDIR);
-       set_value("FIXME enter your setup directory, dumbass.",
+       set_value("In what directory is WebCit installed?",
                setup_directory);
        if (chdir(setup_directory) != 0) {
                important_message("WebCit Setup",
                setup_directory);
        if (chdir(setup_directory) != 0) {
                important_message("WebCit Setup",
@@ -547,16 +538,6 @@ int main(int argc, char *argv[])
                sleep(1);
        }
 
                sleep(1);
        }
 
-       /* Make sure it's stopped.  FIXME put back in
-       if (test_server() == 0) {
-               important_message("WebCit Setup",
-                       "The WebCit service is still running.\n"
-                       "Please stop the service manually and run "
-                       "setup again.");
-               cleanup(1);
-       }
-       */
-
        /* Now begin. */
        switch (setup_type) {
 
        /* Now begin. */
        switch (setup_type) {
 
@@ -576,16 +557,8 @@ int main(int argc, char *argv[])
                        if (a == 0) start_the_service();
                        sleep(1);
                }
                        if (a == 0) start_the_service();
                        sleep(1);
                }
-               if (test_server() == 0) {
-                       important_message("Setup finished",
-                               "Setup is finished.  You may now log in.");
-               }
-               else {
-                       important_message("Setup finished",
-                               "Setup is finished, but the WebCit service "
-                               "failed to start.\n"
-                               "Go back and check your configuration.");
-               }
+               important_message("Setup finished",
+                       "Setup is finished.  You may now log in.");
        }
        else {
                important_message("Setup finished",
        }
        else {
                important_message("Setup finished",
index 1b0a81f59e68670740b908b0a200531b24ba0cf4..7ba7b9493bc8d2e913dd9111fc1b9efd2c495ff1 100644 (file)
@@ -28,7 +28,7 @@
 #define SERVER                 "WebCit v5.00"  /* who's in da house */
 #define DEVELOPER_ID           0
 #define CLIENT_ID              4
 #define SERVER                 "WebCit v5.00"  /* who's in da house */
 #define DEVELOPER_ID           0
 #define CLIENT_ID              4
-#define CLIENT_VERSION         500             /* This version of WebCit */
+#define CLIENT_VERSION         501             /* This version of WebCit */
 #define MINIMUM_CIT_VERSION    611             /* min required Citadel vers */
 #define DEFAULT_HOST           "localhost"     /* Default Citadel server */
 #define DEFAULT_PORT           "504"
 #define MINIMUM_CIT_VERSION    611             /* min required Citadel vers */
 #define DEFAULT_HOST           "localhost"     /* Default Citadel server */
 #define DEFAULT_PORT           "504"