Allow repeated calling of Config::activate
This commit is contained in:
parent
5784e0eb32
commit
4f3f67d23f
1 changed files with 2 additions and 0 deletions
|
@ -419,6 +419,7 @@ int Util::Config::serveForkedSocket(int (*callback)(Socket::Connection & S)) {
|
|||
void Util::Config::activate() {
|
||||
if (vals.isMember("username")) {
|
||||
setUser(getString("username"));
|
||||
vals.removeMember("username");
|
||||
}
|
||||
if (vals.isMember("daemonize") && getBool("daemonize")) {
|
||||
if (vals.isMember("logfile") && getString("logfile") != "") {
|
||||
|
@ -426,6 +427,7 @@ void Util::Config::activate() {
|
|||
} else {
|
||||
Daemonize(false);
|
||||
}
|
||||
vals.removeMember("daemonize");
|
||||
}
|
||||
struct sigaction new_action;
|
||||
struct sigaction cur_action;
|
||||
|
|
Loading…
Add table
Reference in a new issue