|
|
@ -35,6 +35,7 @@ conf_read(const char *filename) {
|
|
|
|
conf->logfile = "webdis.log";
|
|
|
|
conf->logfile = "webdis.log";
|
|
|
|
conf->verbosity = WEBDIS_NOTICE;
|
|
|
|
conf->verbosity = WEBDIS_NOTICE;
|
|
|
|
conf->daemonize = 0;
|
|
|
|
conf->daemonize = 0;
|
|
|
|
|
|
|
|
conf->database = 0;
|
|
|
|
|
|
|
|
|
|
|
|
j = json_load_file(filename, 0, &error);
|
|
|
|
j = json_load_file(filename, 0, &error);
|
|
|
|
if(!j) {
|
|
|
|
if(!j) {
|
|
|
@ -78,6 +79,8 @@ conf_read(const char *filename) {
|
|
|
|
else conf->verbosity = (log_level)tmp;
|
|
|
|
else conf->verbosity = (log_level)tmp;
|
|
|
|
} else if(strcmp(json_object_iter_key(kv), "daemonize") == 0 && json_typeof(jtmp) == JSON_TRUE) {
|
|
|
|
} else if(strcmp(json_object_iter_key(kv), "daemonize") == 0 && json_typeof(jtmp) == JSON_TRUE) {
|
|
|
|
conf->daemonize = 1;
|
|
|
|
conf->daemonize = 1;
|
|
|
|
|
|
|
|
} else if(strcmp(json_object_iter_key(kv), "database") == 0 && json_typeof(jtmp) == JSON_INTEGER) {
|
|
|
|
|
|
|
|
conf->database = json_integer_value(jtmp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|