diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-08-20 15:55:32 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2009-08-20 15:55:32 +0000 |
commit | d1937540f4e81c9915c90dc3ea488de042e59245 (patch) | |
tree | 3c95473960a231ba037fa6bf44ae777038a306d2 | |
parent | d9dcf0459cc5d23d1527f33b108d1d8417f8dce3 (diff) |
Allow relative and absolute paths to work (without magic) with pidfile.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11535 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | .inspircd.inc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/.inspircd.inc b/.inspircd.inc index f419d4b8a..6181d66ec 100644 --- a/.inspircd.inc +++ b/.inspircd.inc @@ -316,10 +316,23 @@ sub getpidfile { # Set the PID file and return. $pidfile = $1; + if (-f $pidfile) + { + return; + } + else + { + if (-f $confpath . $pidfile) + { + $pidfile = $confpath . $pidfile; + return; + } + } return; } } + # If we get here, NO PID FILE! -- Check for includes for my $i (@lines) { $i =~ s/[^=]+=\s(.*)/\1/; @@ -328,6 +341,18 @@ sub getpidfile # Decend into that file, and check for PIDs.. (that sounds like an STD ;/) getpidfile($1); # Was a PID found? + if (-f $pidfile) + { + return; + } + else + { + if (-f $confpath . $pidfile) + { + $pidfile = $confpath . $pidfile; + return; + } + } if ($pidfile ne "") { # Yes, Return. return; |