42 #define AUTHOR_NAME "Matthijs Mekking"
43 #define COPYRIGHT_STR "Copyright (C) 2008-2010 NLnet Labs OpenDNSSEC"
53 fprintf(out,
"Usage: %s [OPTIONS]\n",
"ods-signerd");
54 fprintf(out,
"Start the OpenDNSSEC signer engine daemon.\n\n");
55 fprintf(out,
"Supported options:\n");
56 fprintf(out,
" -c | --config <cfgfile> Read configuration from file.\n");
57 fprintf(out,
" -d | --no-daemon Do not daemonize the signer "
59 fprintf(out,
" -1 | --single-run Run once, then exit.\n");
60 fprintf(out,
" -h | --help Show this help and exit.\n");
61 fprintf(out,
" -i | --info Print configuration and exit.\n");
62 fprintf(out,
" -v | --verbose Increase verbosity.\n");
63 fprintf(out,
" -V | --version Show version and exit.\n");
64 fprintf(out,
"\nBSD licensed, see LICENSE in source package for "
66 fprintf(out,
"Version %s. Report bugs to <%s>.\n",
67 PACKAGE_VERSION, PACKAGE_BUGREPORT);
78 fprintf(out,
"%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION);
81 fprintf(out,
"See source files for more license information\n");
93 main(
int argc,
char* argv[])
96 int options_index = 0;
100 int cmdline_verbosity = 0;
101 const char* cfgfile = ODS_SE_CFGFILE;
102 static struct option long_options[] = {
103 {
"single-run", no_argument, 0,
'1'},
104 {
"config", required_argument, 0,
'c'},
105 {
"no-daemon", no_argument, 0,
'd'},
106 {
"help", no_argument, 0,
'h'},
107 {
"info", no_argument, 0,
'i'},
108 {
"verbose", no_argument, 0,
'v'},
109 {
"version", no_argument, 0,
'V'},
114 while ((c=getopt_long(argc, argv,
"1c:dhivV",
115 long_options, &options_index)) != -1) {
153 #ifdef ENFORCER_TIMESHIFT
154 if (getenv(
"ENFORCER_TIMESHIFT")) {
155 fprintf(stdout,
"WARNING: timeshift %s detected, running once only\n",
156 getenv(
"ENFORCER_TIMESHIFT"));
159 fprintf(stdout,
"DEBUG: timeshift mode enabled, but not set.\n");
164 fprintf(stdout,
"OpenDNSSEC signer engine version %s\n", PACKAGE_VERSION);
165 engine_start(cfgfile, cmdline_verbosity, daemonize, info, single_run);