WEBCIT for the Citadel/UX System
- version 5.00
+ version 5.01
Copyright (C) 1996-2003 by the authors. Portions written by:
Art Cancro
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
* $Id$
*
* WebCit setup utility
+ *
+ * (This is basically just an install wizard. It's not required.)
*
*/
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
- * 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) {
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];
- /* 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(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);
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);
}
-/*
- * 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
*/
/* 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",
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) {
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",