* setup.c: updated the setup script to configure two /etc/inittab entries,
authorArt Cancro <ajc@citadel.org>
Wed, 2 Jun 2004 02:07:54 +0000 (02:07 +0000)
committerArt Cancro <ajc@citadel.org>
Wed, 2 Jun 2004 02:07:54 +0000 (02:07 +0000)
  one for http and one for https.

webcit/ChangeLog
webcit/setup.c

index 1d780c7eeb60b41376150e209e3dc5c4b2ca4a2d..e82aa1199f7a08562409cbdb8f231b99151c211b 100644 (file)
@@ -1,4 +1,8 @@
 $Log$
+Revision 510.12  2004/06/02 02:07:54  ajc
+* setup.c: updated the setup script to configure two /etc/inittab entries,
+  one for http and one for https.
+
 Revision 510.11  2004/06/01 21:46:47  ajc
 * crypto.c: when an SSL connection errors out (and closes) unexpectedly
   during a read or write operation, do not attempt to finish the operation
@@ -1852,4 +1856,3 @@ 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
-
index 3c7eb7fa1d7bc53dbb914308a9a008fdae9d2daf..d37f983e31eb8af823dba75fd1e90642ef4cd452 100644 (file)
@@ -386,6 +386,7 @@ void check_inittab_entry(void)
        char looking_for[SIZ];
        char question[SIZ];
        char entryname[5];
+       char entryname2[5];
        char http_port[128];
        char https_port[128];
        char hostname[128];
@@ -448,7 +449,7 @@ void check_inittab_entry(void)
                }
        }
 
-       /* Generate a unique entry name for /etc/inittab */
+       /* Generate unique entry names for /etc/inittab */
        snprintf(entryname, sizeof entryname, "c0");
        do {
                ++entryname[1];
@@ -464,6 +465,7 @@ void check_inittab_entry(void)
                snprintf(buf, sizeof buf,
                     "grep %s: /etc/inittab >/dev/null 2>&1", entryname);
        } while (system(buf) == 0);
+       
 
        /* Now write it out to /etc/inittab */
        infp = fopen("/etc/inittab", "a");
@@ -471,14 +473,13 @@ void check_inittab_entry(void)
                display_error(strerror(errno));
        } else {
                fprintf(infp, "# Start the WebCit server...\n");
-#ifdef HAVE_OPENSSL
-               fprintf(infp, "%s:2345:respawn:%s -p%s -s%s %s %s\n",
-                       entryname, looking_for,
-                       http_port, https_port, hostname, portname);
-#else
-               fprintf(infp, "%s:2345:respawn:%s -p%s %s %s\n",
+               fprintf(infp, "h%s:2345:respawn:%s -p%s %s %s\n",
                        entryname, looking_for,
                        http_port, hostname, portname);
+#ifdef HAVE_OPENSSL
+               fprintf(infp, "s%s:2345:respawn:%s -p%s -s %s %s\n",
+                       entryname, looking_for,
+                       https_port, hostname, portname);
 #endif
                fclose(infp);
                strcpy(init_entry, entryname);