122 int options_index = 0;
125 int cmdline_verbosity = 0;
126 char *time_arg = NULL;
127 const char* cfgfile = ODS_SE_CFGFILE;
128 static struct option long_options[] = {
129 {
"config", required_argument, 0,
'c'},
130 {
"no-daemon", no_argument, 0,
'd'},
131 {
"help", no_argument, 0,
'h'},
132 {
"info", no_argument, 0,
'i'},
133 {
"verbose", no_argument, 0,
'v'},
134 {
"version", no_argument, 0,
'V'},
135 {
"set-time", required_argument, 0, 256},
139 if(argv[0][0] !=
'/') {
140 char *path = getcwd(NULL,0);
141 asprintf(&argv0,
"%s/%s", path, argv[0]);
144 argv0 = strdup(argv[0]);
148 while ((c=getopt_long(argc, argv,
"c:dhivV",
149 long_options, &options_index)) != -1) {
188 if(set_time_now_str(time_arg)) {
189 fprintf(stderr,
"Error: Failed to interpret start time argument. Daemon not started.\n");
195 fprintf(stdout,
"OpenDNSSEC signer engine version %s\n", PACKAGE_VERSION);
197 ods_janitor_initialize(argv0);
198 program_setup(cfgfile, cmdline_verbosity);
199 returncode =
engine_start(cfgfile, cmdline_verbosity, daemonize, info);