From d1ddbd62f91d4b9453447b5d25f5e41e807b0010 Mon Sep 17 00:00:00 2001 From: danieldg Date: Tue, 13 Oct 2009 01:44:22 +0000 Subject: Change to new execution directory structure Don't change CWD into bin/ Remove path-resolution hacks from configuration Store pidfile and xline DBs in data, logs in logs. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11866 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/inspircd.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'src/inspircd.cpp') diff --git a/src/inspircd.cpp b/src/inspircd.cpp index a932b95e1..4956cfa8c 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -286,18 +286,9 @@ bool InspIRCd::DaemonSeed() void InspIRCd::WritePID(const std::string &filename) { - std::string fname = (filename.empty() ? "inspircd.pid" : filename); - std::replace(fname.begin(), fname.end(), '\\', '/'); - if ((fname[0] != '/') && (!Config->StartsWithWindowsDriveLetter(filename))) - { - std::string::size_type pos; - std::string confpath = this->ConfigFileName; - if ((pos = confpath.rfind("/")) != std::string::npos) - { - /* Leaves us with just the path */ - fname = confpath.substr(0, pos) + std::string("/") + fname; - } - } + std::string fname(filename); + if (fname.empty()) + fname = "data/inspircd.pid"; std::ofstream outfile(fname.c_str()); if (outfile.is_open()) { @@ -470,7 +461,6 @@ InspIRCd::InspIRCd(int argc, char** argv) : WSAStartup(MAKEWORD(2,0), &wsadata); ChangeWindowsSpecificPointers(); #endif - Config->MyExecutable = argv[0]; /* Set the finished argument values */ Config->nofork = do_nofork; -- cgit v1.2.3