diff options
Diffstat (limited to 'server/src/pracrod.cc')
-rw-r--r-- | server/src/pracrod.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/server/src/pracrod.cc b/server/src/pracrod.cc index 6ca21db..634ae67 100644 --- a/server/src/pracrod.cc +++ b/server/src/pracrod.cc @@ -82,6 +82,7 @@ static const char usage_str[] = " -f, --foreground Run in foreground mode (non-background mode)\n" " -u, --user user Run as 'user' (overrides the configfile)\n" " -g, --group group Run as 'group' (overrides the configfile)\n" +" -x, --xml-basedir d Use 'd' as basedir for finding template- and macro-files (default "XML").\n" " -v, --version Print version information and exit.\n" " -h, --help Print this message and exit.\n" ; @@ -139,6 +140,7 @@ int main(int argc, char *argv[]) char *user = NULL; char *group = NULL; bool foreground = false; + char *xml_basedir = NULL; int option_index = 0; while(1) { @@ -150,10 +152,11 @@ int main(int argc, char *argv[]) {"group", required_argument, 0, 'g'}, {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'}, + {"xml-basedir", required_argument, 0, 'x'}, {0, 0, 0, 0} }; - c = getopt_long (argc, argv, "hvfc:u:g:", long_options, &option_index); + c = getopt_long (argc, argv, "hvfc:u:g:x:", long_options, &option_index); if (c == -1) break; @@ -175,6 +178,10 @@ int main(int argc, char *argv[]) group = strdup(optarg); break; + case 'x': + xml_basedir = strdup(optarg); + break; + case '?': case 'h': printf(version_str); @@ -204,6 +211,10 @@ int main(int argc, char *argv[]) group = strdup(Conf::server_group.c_str()); } + if(xml_basedir) { + Conf::xml_basedir = xml_basedir; + } + signal(SIGHUP, reload); signal(SIGCLD, childwait); if(foreground) signal (SIGINT, ctrl_c); |