updatedirowner(s->dirname, s->user, s->group);
}
- if (!cfg.createdirs) {
+ if (!cfg.createdirs || !s->rundaemon) {
return;
}
initdstate(&s);
defaultcfg();
cfg.uselogging = 1;
+ s.rundaemon = 1;
strncpy_nt(s.dirname, TESTDBDIR, 512);
snprintf(logdir, 512, "%s/log/vnstat", TESTDIR);
snprintf(piddir, 512, "%s/pid/vnstat", TESTDIR);
initdstate(&s);
defaultcfg();
cfg.uselogging = 1;
+ s.rundaemon = 1;
strncpy_nt(s.dirname, TESTDBDIR, 512);
snprintf(logdir, 512, "%s/log/vnstat", TESTDIR);
snprintf(piddir, 512, "%s/pid/vnstat", TESTDIR);