fix logfile handling on restart
This commit is contained in:
parent
aea79fe6cd
commit
d3c241b7a3
@ -90,7 +90,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
/* check logfile */
|
/* check logfile */
|
||||||
const char *logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
|
const char *logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
|
||||||
if (logfile != NULL && debug == 0) {
|
if (!debug) {
|
||||||
/* check pidfile */
|
/* check pidfile */
|
||||||
const char *pidfile = config_get_string("global", "pidfile", DEFAULT_PIDFILE);
|
const char *pidfile = config_get_string("global", "pidfile", DEFAULT_PIDFILE);
|
||||||
if (pidfile_check(pidfile, 1) != 0) {
|
if (pidfile_check(pidfile, 1) != 0) {
|
||||||
@ -145,7 +145,7 @@ int main(int argc, char *argv[])
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
|
logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
|
||||||
if (log_init(logfile) < 0)
|
if (!debug && log_init(logfile) < 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
log_print(LOG_EVERYTIME, "sammler restarted (pid:%d) ", getpid());
|
log_print(LOG_EVERYTIME, "sammler restarted (pid:%d) ", getpid());
|
||||||
|
Loading…
Reference in New Issue
Block a user