diff options
Diffstat (limited to 'server/src/pracrod.cc')
-rw-r--r-- | server/src/pracrod.cc | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/server/src/pracrod.cc b/server/src/pracrod.cc index dff00d9..c668159 100644 --- a/server/src/pracrod.cc +++ b/server/src/pracrod.cc @@ -82,8 +82,9 @@ static const char usage_str[] = " -h, --help Print this message and exit.\n" ; -void reload(int fisk) +void reload(int) { + /* int port; printf("Reload!\n"); port = config()->lookup("port"); @@ -93,6 +94,7 @@ void reload(int fisk) TCPSocket socket; socket.connect("localhost", port); } + */ } class PracroDaemon : public Daemon { @@ -167,33 +169,24 @@ int main(int argc, char *argv[]) } } + // Load config + /* char defval[512]; sprintf(defval, ETC"/pracrod.conf"); - char *cfname = NULL; if(!configfile) cfname = defval;//ETC"/pracrod.conf"; else cfname = configfile; Configuration conf(cfname); initConfig(&conf); + */ if(!user) { - std::string userstr; - try { - user = (char*)(const char*)config()->lookup("user"); - } catch( ... ) { - printf("User not found in config.\n"); - } + user = strdup(Conf::server_user.c_str()); } if(!group) { - std::string groupstr; - try { - group = (char*)(const char*)config()->lookup("group"); - } catch( ... ) { - printf("Group not found in config.\n"); - } - + group = strdup(Conf::server_group.c_str()); } PracroDaemon daemon; |