40 #define AUTHOR_NAME "Matthijs Mekking" 41 #define COPYRIGHT_STR "Copyright (C) 2008-2010 NLnet Labs OpenDNSSEC" 51 fprintf(out,
"Usage: %s [OPTIONS]\n",
"ods-signerd");
52 fprintf(out,
"Start the OpenDNSSEC signer engine daemon.\n\n");
53 fprintf(out,
"Supported options:\n");
54 fprintf(out,
" -c | --config <cfgfile> Read configuration from file.\n");
55 fprintf(out,
" -d | --no-daemon Do not daemonize the signer " 57 fprintf(out,
" -1 | --single-run Run once, then exit.\n");
58 fprintf(out,
" -h | --help Show this help and exit.\n");
59 fprintf(out,
" -i | --info Print configuration and exit.\n");
60 fprintf(out,
" -v | --verbose Increase verbosity.\n");
61 fprintf(out,
" -V | --version Show version and exit.\n");
62 fprintf(out,
"\nBSD licensed, see LICENSE in source package for " 64 fprintf(out,
"Version %s. Report bugs to <%s>.\n",
65 PACKAGE_VERSION, PACKAGE_BUGREPORT);
76 fprintf(out,
"%s version %s\n", PACKAGE_NAME, PACKAGE_VERSION);
79 fprintf(out,
"See source files for more license information\n");
89 main(
int argc,
char* argv[])
92 int options_index = 0;
96 int cmdline_verbosity = 0;
97 const char* cfgfile = ODS_SE_CFGFILE;
98 static struct option long_options[] = {
99 {
"single-run", no_argument, 0,
'1'},
100 {
"config", required_argument, 0,
'c'},
101 {
"no-daemon", no_argument, 0,
'd'},
102 {
"help", no_argument, 0,
'h'},
103 {
"info", no_argument, 0,
'i'},
104 {
"verbose", no_argument, 0,
'v'},
105 {
"version", no_argument, 0,
'V'},
110 while ((c=getopt_long(argc, argv,
"1c:dhivV",
111 long_options, &options_index)) != -1) {
149 #ifdef ENFORCER_TIMESHIFT 150 if (getenv(
"ENFORCER_TIMESHIFT")) {
151 fprintf(stdout,
"WARNING: timeshift %s detected, running once only\n",
152 getenv(
"ENFORCER_TIMESHIFT"));
155 fprintf(stdout,
"DEBUG: timeshift mode enabled, but not set.\n");
160 fprintf(stdout,
"OpenDNSSEC signer engine version %s\n", PACKAGE_VERSION);
161 engine_start(cfgfile, cmdline_verbosity, daemonize, info, single_run);
int main(int argc, char *argv[])
void engine_start(const char *cfgfile, int cmdline_verbosity, int daemonize, int info, int single_run)