Upload files to "uno-stats-monitor/unomond"
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
int debug = 0;
|
||||
int running = 0;
|
||||
char *conf_file_name = "unomond.conf";
|
||||
char *pid_file_name = NULL;
|
||||
char *pid_file_name = "/tmp/unomond.pid";
|
||||
int pid_fd = -1;
|
||||
const char *app_name = "UnomonD";
|
||||
FILE *log_stream;
|
||||
@@ -149,9 +149,9 @@ int read_conf_file(int reload) {
|
||||
|
||||
config_init(&cfg);
|
||||
if(conf_file_name == NULL) {
|
||||
fprintf(log_stream, "Can not open configuration file!\n");
|
||||
syslog(LOG_INFO, "Can not open configuration file %s, exiting.",conf_file_name);
|
||||
return(EXIT_FAILURE);
|
||||
fprintf(log_stream, "Can not open configuration file %s.\n",conf_file_name);
|
||||
syslog(LOG_INFO, "Can not open configuration file %s.",conf_file_name);
|
||||
return(1);
|
||||
}
|
||||
|
||||
// read the file. if there is an error, report it and exit
|
||||
@@ -625,6 +625,7 @@ int main(int argc, char *argv[])
|
||||
switch (value) {
|
||||
case 'c':
|
||||
conf_file_name = strdup(optarg);
|
||||
fprintf(log_stream, "Reloading configuation from command line...\n");
|
||||
read_conf_file(0);
|
||||
fprintf(log_stream, "Command Line: Using 'conffile': %s\n",conf_file_name);
|
||||
break;
|
||||
@@ -644,13 +645,13 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
case 'd':
|
||||
start_daemonized = 1;
|
||||
fprintf(log_stream, "Command Line: Daemonizing...");
|
||||
fprintf(log_stream, "Command Line: Daemonizing...\n");
|
||||
break;
|
||||
case 'D':
|
||||
debug = 1;
|
||||
fprintf(log_stream, "Command Line: Using Debugging\n");
|
||||
break;
|
||||
case 'h' | '?':
|
||||
case 'h':
|
||||
print_help();
|
||||
return EXIT_SUCCESS;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user