X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=blobdiff_plain;f=html%2Fcgi-bin%2Fservices.cgi;h=64fdbba05a4ee6afcaceae2caa1dbee12f485782;hp=22a9ac707cce13d072c261398fae6c9ed8a25234;hb=39155be80547e808e859f8f4dcd93763876bff5f;hpb=b431bfce486adcccac747c21882a6f735583104e diff --git a/html/cgi-bin/services.cgi b/html/cgi-bin/services.cgi index 22a9ac707c..64fdbba05a 100644 --- a/html/cgi-bin/services.cgi +++ b/html/cgi-bin/services.cgi @@ -49,7 +49,7 @@ my %servicenames =( $Lang::tr{'dhcp server'} => 'dhcpd', $Lang::tr{'web server'} => 'httpd', $Lang::tr{'cron server'} => 'fcron', - $Lang::tr{'dns proxy server'} => 'dnsmasq', + $Lang::tr{'dns proxy server'} => 'unbound', $Lang::tr{'logging server'} => 'syslogd', $Lang::tr{'kernel logging server'} => 'klogd', $Lang::tr{'ntp server'} => 'ntpd', @@ -116,25 +116,33 @@ if ( $querry[0] =~ "processescpu"){ &Header::openbox('100%', 'left', $Lang::tr{'services'}); print < - - +
$Lang::tr{'services'}$Lang::tr{'status'}PID$Lang::tr{'memory'}
+ + + + + + END ; my $key = ''; + my $col=""; foreach $key (sort keys %servicenames){ $lines++; if ($lines % 2){ - print "\n\n"; + $col="bgcolor='$color{'color22'}'"; + print ""; }else{ - print "\n\n"; + $col="bgcolor='$color{'color20'}'"; + print ""; } my $shortname = $servicenames{$key}; - my $status = &isrunning($shortname); + my $status = &isrunning($shortname,$col); print "$status\n"; print "\n"; @@ -152,14 +160,14 @@ END print < -
$Lang::tr{'services'}$Lang::tr{'status'}PID$Lang::tr{'memory'}
"; - print %link->{$key}; - print "
"; + print $link{$key}; + print "
"; - print %link->{$key}; - print "
"; + print $link{$key}; + print "
- - - - - - - +
AddonBoot$Lang::tr{'action'}$Lang::tr{'status'}PID$Lang::tr{'memory'}
+ + + + + + + END ; @@ -180,19 +188,24 @@ END # mdadm should not stopped with webif because this could crash the system # chomp($_); + if ( $_ eq 'squid' ) { + next; + } if ( ($_ ne "alsa") && ($_ ne "mdadm") ) { $lines++; if ($lines % 2){ - print ""; + print ""; + $col="bgcolor='$color{'color22'}'"; }else{ - print ""; + print ""; + $col="bgcolor='$color{'color20'}'"; } - print " "; - my $status = isautorun($_); + print " "; + my $status = isautorun($_,$col); print "$status "; - print ""; - print " "; - my $status = &isrunningaddon($_); + print ""; + print " "; + my $status = &isrunningaddon($_,$col); $status =~ s/\\[[0-1]\;[0-9]+m//g; chomp($status); @@ -219,16 +232,17 @@ END sub isautorun{ my $cmd = $_[0]; - my $status = ""; + my $col = $_[1]; + my $status = ""; my $init = `find /etc/rc.d/rc3.d/S??${cmd} 2>/dev/null`; chomp ($init); if ($init ne ''){ - $status = ""; + $status = ""; } $init = `find /etc/rc.d/rc3.d/off/S??${cmd} 2>/dev/null`; chomp ($init); if ($init ne ''){ - $status = ""; + $status = ""; } return $status; @@ -236,7 +250,8 @@ sub isautorun{ sub isrunning{ my $cmd = $_[0]; - my $status = ""; + my $col = $_[1]; + my $status = ""; my $pid = ''; my $testcmd = ''; my $exename; @@ -267,7 +282,7 @@ sub isrunning{ close(FILE); } if ($testcmd =~ /$exename/){ - $status = ""; + $status = ""; } } return $status; @@ -275,7 +290,8 @@ sub isrunning{ sub isrunningaddon{ my $cmd = $_[0]; - my $status = ""; + my $col = $_[1]; + my $status = ""; my $pid = ''; my $testcmd = ''; my $exename; @@ -293,7 +309,7 @@ sub isrunningaddon{ $testcmd =~ s///gi; my @pid = split(/\s/,$testcmd); - $status .=""; + $status .=""; my $memory = 0; @@ -305,9 +321,9 @@ sub isrunningaddon{ } $memory+=$memory[0]; } - $status .=""; + $status .=""; }else{ - $status = ""; + $status = ""; } return $status; }
AddonBoot$Lang::tr{'action'}$Lang::tr{'status'}PID$Lang::tr{'memory'}
$_$_$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{$Lang::tr{'stopped'}$Lang::tr{'stopped'}$Lang::tr{'running'}$pid$memory$Lang::tr{'running'}$pid$memory$Lang::tr{'stopped'}$Lang::tr{'stopped'}$pid[0]$pid[0]$memory KB$memory KB$Lang::tr{'stopped'}$Lang::tr{'stopped'}