mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 11:13:24 +02:00
Made some nicer graphs and fixes
Changed ast package from Peter git-svn-id: http://svn.ipfire.org/svn/ipfire/branches/2.1/trunk@1184 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -6,6 +6,9 @@ require "${General::swroot}/header.pl";
|
||||
|
||||
&Header::showhttpheaders();
|
||||
|
||||
#use warnings;
|
||||
#use CGI::Carp 'fatalsToBrowser';
|
||||
|
||||
my %asterisksettings;
|
||||
|
||||
&Header::getcgihash(\%asterisksettings);
|
||||
@@ -42,8 +45,23 @@ if ($asterisksettings{'ACTION'} eq "$Lang::tr{'reload'} IAX")
|
||||
system("/etc/init.d/asterisk remod iax >/dev/null 2>&1");
|
||||
}
|
||||
|
||||
$checked{'ENABLE_AST'}{'status'} = system("/etc/init.d/asterisk status >/dev/null 2>&1");
|
||||
if ($checked{'ENABLE_AST'}{'status'}) {
|
||||
my $pid = '';
|
||||
my $testcmd = '';
|
||||
my $exename;
|
||||
my @memory;
|
||||
|
||||
if (open(FILE, "/var/run/asterisk.pid")){
|
||||
$pid = <FILE>; chomp $pid;
|
||||
close FILE;
|
||||
if (open(FILE, "/proc/${pid}/status")){
|
||||
while (<FILE>){
|
||||
if (/^Name:\W+(.*)/) {$testcmd = $1;}
|
||||
}
|
||||
close FILE;
|
||||
}
|
||||
}
|
||||
|
||||
if ($testcmd !~ /asterisk/) {
|
||||
$checked{'ENABLE_AST'}{'status_s'}="<font style=\"color:white;background-color:red;\"> $Lang::tr{'not running'}</font>";
|
||||
$checked{'ENABLE_AST'}{'status_b'}="<INPUT TYPE='submit' NAME='ACTION' VALUE='Start'>";
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user