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");
91 main(
int argc,
char* argv[])
94 int options_index = 0;
98 int cmdline_verbosity = 0;
99 const char* cfgfile = ODS_SE_CFGFILE;
100 static struct option long_options[] = {
101 {
"single-run", no_argument, 0,
'1'},
102 {
"config", required_argument, 0,
'c'},
103 {
"no-daemon", no_argument, 0,
'd'},
104 {
"help", no_argument, 0,
'h'},
105 {
"info", no_argument, 0,
'i'},
106 {
"verbose", no_argument, 0,
'v'},
107 {
"version", no_argument, 0,
'V'},
112 while ((c=getopt_long(argc, argv,
"1c:dhivV",
113 long_options, &options_index)) != -1) {
151 #ifdef ENFORCER_TIMESHIFT
152 if (getenv(
"ENFORCER_TIMESHIFT")) {
153 fprintf(stdout,
"WARNING: timeshift %s detected, running once only\n",
154 getenv(
"ENFORCER_TIMESHIFT"));
157 fprintf(stdout,
"DEBUG: timeshift mode enabled, but not set.\n");
162 fprintf(stdout,
"OpenDNSSEC signer engine version %s\n", PACKAGE_VERSION);
163 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)