]> code.citadel.org Git - citadel.git/blobdiff - webcit-ng/main.c
new license declaration text
[citadel.git] / webcit-ng / main.c
index 958b4ea40326284bbaa763c6fb85e3c65c5d3362..03136913182b84fb81c91b19525d77cdc1014f73 100644 (file)
@@ -1,21 +1,13 @@
 // 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) {
@@ -33,6 +25,7 @@ int main(int argc, char **argv) {
                        setuid(atoi(optarg));
                        break;
                case 'h':
+                       ctdl_dir = strdup(optarg);
                        break;
                case 'd':
                        running_as_daemon = 1;
@@ -86,14 +79,15 @@ int main(int argc, char **argv) {
                                "[-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
@@ -101,7 +95,7 @@ int main(int argc, char **argv) {
 
        // 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.");