]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - html/cgi-bin/services.cgi
Fix addon service pid/memory display if the addon name has numbers.
[people/pmueller/ipfire-2.x.git] / html / cgi-bin / services.cgi
old mode 100755 (executable)
new mode 100644 (file)
index 156db2d..b6efe09
@@ -2,7 +2,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2008  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2005-2010  IPFire Team                                        #
 #                                                                             #
 # This program is free software: you can redistribute it and/or modify        #
 # it under the terms of the GNU General Public License as published by        #
@@ -275,10 +275,11 @@ sub isrunningaddon{
        my $exename;
        my @memory;
 
-       my $testcmd = `/usr/local/bin/addonctrl $_ status`;
+       my $testcmd = `/usr/local/bin/addonctrl $_ status 2>/dev/null`;
 
        if ( $testcmd =~ /is\ running/ && $testcmd !~ /is\ not\ running/){
                $status = "<td align='center' bgcolor='${Header::colourgreen}'><font color='white'><b>$Lang::tr{'running'}</b></font></td>";
+               $testcmd =~ s/.* //gi;
                $testcmd =~ s/[a-z_]//gi;
                $testcmd =~ s/\[[0-1]\;[0-9]+//gi;
                $testcmd =~ s/[\(\)\.]//gi;