X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=.inspircd.inc;h=a3df44eac7cd1bbe516db9aa4bc6bc5b806f9ccf;hb=a8878569083bfa4753e9e118adee0ed1da6a0325;hp=518d823a75a773e4e56b2faad6f967d30719b193;hpb=547e7e9b382255b1699ff897f40fb4ed659c3360;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/.inspircd.inc b/.inspircd.inc index 518d823a7..a3df44eac 100644 --- a/.inspircd.inc +++ b/.inspircd.inc @@ -18,7 +18,7 @@ use Fcntl; my $basepath = "@BASE_DIR@"; my $confpath = "@CONFIG_DIR@/"; my $binpath = "@BINARY_DIR@"; -my $runpath = "@BINARY_DIR@"; +my $runpath = "@BASE_DIR@"; my $valgrindlogpath = "$basepath/valgrindlogs"; my $executable = "@EXECUTABLE@"; my $version = "@VERSION@"; @@ -303,7 +303,7 @@ sub getpidfile # Are We using a relative path? if ($file !~ /^\//) { # Convert it to a full path. - $file = $confpath . $file; + $file = $runpath .'/'. $file; } # Have we checked this file before? @@ -311,7 +311,7 @@ sub getpidfile $filesparsed{$file} = 1; # Open the File.. - open INFILE, "< $file" or die "Unable to open file $file included in configuration\n"; + open INFILE, '<', $file or return; # Grab entire file contents.. my(@lines) = ; # Close the file @@ -331,13 +331,10 @@ sub getpidfile { return; } - else + elsif (-f "$runpath/$pidfile") { - if (-f $confpath . $pidfile) - { - $pidfile = $confpath . $pidfile; - return; - } + $pidfile = "$runpath/$pidfile"; + return; } return; } @@ -352,18 +349,6 @@ 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; @@ -372,7 +357,7 @@ sub getpidfile } # End of includes / No includes found. Using default. - $pidfile = $confpath . "inspircd.pid"; + $pidfile = $runpath . "/data/inspircd.pid"; } sub getstatus { @@ -442,7 +427,7 @@ sub validateconf # Are We using a relative path? if ($file !~ /^\//) { # Convert it to a full path.. - $file = $confpath . $file; + $file = $runpath . $file; } # Have we checked this file before?