fix logfile handling on restart

This commit is contained in:
Olaf Rempel 2009-05-03 14:05:09 +02:00
parent aea79fe6cd
commit d3c241b7a3
1 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ int main(int argc, char *argv[])
/* check logfile */
const char *logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
if (logfile != NULL && debug == 0) {
if (!debug) {
/* check pidfile */
const char *pidfile = config_get_string("global", "pidfile", DEFAULT_PIDFILE);
if (pidfile_check(pidfile, 1) != 0) {
@ -145,7 +145,7 @@ int main(int argc, char *argv[])
break;
logfile = config_get_string("global", "logfile", DEFAULT_LOGFILE);
if (log_init(logfile) < 0)
if (!debug && log_init(logfile) < 0)
break;
log_print(LOG_EVERYTIME, "sammler restarted (pid:%d) ", getpid());