diff options
-rw-r--r-- | make/template/inspircd | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/make/template/inspircd b/make/template/inspircd index ed98a186b..1b9f25a86 100644 --- a/make/template/inspircd +++ b/make/template/inspircd @@ -380,16 +380,16 @@ sub getpidfile sub getstatus { my $pid = getprocessid(); return 0 if $pid == 0; - return kill 0, $pid; + return kill 0, $1; } sub getprocessid { - my $pid; - open PIDFILE, "< $pidfile" or return 0; + my $pid = 0; + open PIDFILE, '<', $pidfile or return 0; while(<PIDFILE>) { - $pid = $_; + /(\d+)/ and $pid = $1; } close PIDFILE; return $pid; |