// Main entry point for the program.
//
-// Copyright (c) 1996-2021 by the citadel.org team
+// Copyright (c) 1996-2022 by the citadel.org team
//
-// This program is open source software. It runs great on the
-// Linux operating system (and probably elsewhere). You can use,
-// copy, and run it under the terms of the GNU General Public
-// License version 3.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
+// This program is open source software. Use, duplication, or
+// disclosure are subject to the GNU General Public License v3.
#include "webcit.h" // All other headers are included from this header.
-char *ctdlhost = CTDLHOST;
-char *ctdlport = CTDLPORT;
+char *ctdl_dir = CTDL_DIR;
// Main entry point for the web server.
int main(int argc, char **argv) {
setuid(atoi(optarg));
break;
case 'h':
+ ctdl_dir = strdup(optarg);
break;
case 'd':
running_as_daemon = 1;
"[-d] [-Z] [-G i18ndumpfile] "
"[-u uid] [-h homedirectory] "
"[-D daemonizepid] [-v] "
- "[-g defaultlandingpage] [-B basesize] " "[-s] [-S cipher_suites]" "[remotehost [remoteport]]\n");
+ "[-g defaultlandingpage] [-B basesize] "
+ "[-s] [-S cipher_suites]"
+ "[-h citadel_server_directory]\n"
+ );
return 1;
}
- if (optind < argc) {
- ctdlhost = argv[optind];
- if (++optind < argc)
- ctdlport = argv[optind];
+ while (optind < argc) {
+ ctdl_dir = strdup(argv[optind++]);
}
// Start the logger
// Tell 'em who's in da house
syslog(LOG_NOTICE, "MAKE WEBCIT GREAT AGAIN!");
- syslog(LOG_NOTICE, "Copyright (C) 1996-2021 by the citadel.org team");
+ syslog(LOG_NOTICE, "Copyright (C) 1996-2022 by the citadel.org team");
syslog(LOG_NOTICE, " ");
syslog(LOG_NOTICE, "This program is open source software: you can redistribute it and/or");
syslog(LOG_NOTICE, "modify it under the terms of the GNU General Public License, version 3.");