X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=.inspircd.inc;h=05cbe0ea03df3a052219589cefd92d3255cbb40c;hb=9facfd70b5a8ca4dca16fc93f6fcfe1c2bf6ce0f;hp=d65df60b356f7d0158e3194257e437e03499af5b;hpb=526a37bc7a7e20fa8b912d7fd3ab61387c7051d9;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/.inspircd.inc b/.inspircd.inc index d65df60b3..05cbe0ea0 100644 --- a/.inspircd.inc +++ b/.inspircd.inc @@ -261,7 +261,7 @@ sub cmd_stop() # Get to here, we have something to kill. my $pid = getprocessid(); print "Stopping InspIRCd (pid: $pid)...\n"; - my $maxwait = (`ps -o command $pid` =~ /valgrind/i) ? 90 : 5; + my $maxwait = (`ps -o command $pid` =~ /valgrind/i) ? 90 : 15; kill TERM => $pid or die "Cannot terminate IRCd: $!\n"; for (1..$maxwait) { sleep 1; @@ -303,7 +303,7 @@ sub getpidfile # Are We using a relative path? if ($file !~ /^\//) { # Convert it to a full path. - $file = $runpath . $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 $runpath . $pidfile) - { - $pidfile = $runpath . $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 $runpath . $pidfile) - { - $pidfile = $runpath . $pidfile; - return; - } - } if ($pidfile ne "") { # Yes, Return. return;