$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
1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
* webserver.c: warning fix
-
char looking_for[SIZ];
char question[SIZ];
char entryname[5];
+ char entryname2[5];
char http_port[128];
char https_port[128];
char hostname[128];
}
}
- /* Generate a unique entry name for /etc/inittab */
+ /* Generate unique entry names for /etc/inittab */
snprintf(entryname, sizeof entryname, "c0");
do {
++entryname[1];
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");
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);