Diff for /loncom/init.d/loncontrol between versions 1.40 and 1.41

version 1.40, 2010/04/17 16:54:24 version 1.41, 2010/12/30 18:40:38
Line 122  if ($command eq "restart") { Line 122  if ($command eq "restart") {
     my $iptables = &LONCAPA::Firewall::get_pathto_iptables();      my $iptables = &LONCAPA::Firewall::get_pathto_iptables();
     my @fw_chains = &LONCAPA::Firewall::get_fw_chains($iptables);      my @fw_chains = &LONCAPA::Firewall::get_fw_chains($iptables);
     my $lond_port = &LONCAPA::Firewall::get_lond_port();      my $lond_port = &LONCAPA::Firewall::get_lond_port();
     my %iphost = &Apache::lonnet::get_iphost();      my %iphost;
     if ($command eq 'stop') {      if ($command eq 'stop') {
         print 'Stopping LON-CAPA'."\n";          print 'Stopping LON-CAPA'."\n";
         foreach my $daemon ('lonsql','lond','lonc','lonmemcached','lonmaxima','lonr') {          foreach my $daemon ('lonsql','lond','lonc','lonmemcached','lonmaxima','lonr') {
Line 131  if ($command eq "restart") { Line 131  if ($command eq "restart") {
     &stop_daemon($daemon,$killallname);      &stop_daemon($daemon,$killallname);
         }          }
         my $firewall_result =           my $firewall_result = 
             &LONCAPA::Firewall::firewall_close_port($iptables,\@fw_chains,$lond_port,[$lond_port]);              &LONCAPA::Firewall::firewall_close_port($iptables,\@fw_chains,$lond_port,\%iphost,[$lond_port]);
         if ($firewall_result) {          if ($firewall_result) {
             print "$firewall_result\n";              print "$firewall_result\n";
         }          }
         &clean_sockets();          &clean_sockets();
     } elsif ($command eq "start") {      } elsif ($command eq "start") {
           %iphost = &Apache::lonnet::get_iphost();
         my $firewall_result =           my $firewall_result = 
             &LONCAPA::Firewall::firewall_open_port($iptables,\@fw_chains,$lond_port,\%iphost,[$lond_port]);              &LONCAPA::Firewall::firewall_open_port($iptables,\@fw_chains,$lond_port,\%iphost,[$lond_port]);
         if (($firewall_result eq 'ok') || ($firewall_result eq 'inactive firewall')) {          if (($firewall_result eq 'ok') || ($firewall_result eq 'inactive firewall')) {
Line 156  if ($command eq "restart") { Line 157  if ($command eq "restart") {
             }              }
         }          }
     } elsif ($command eq "status") {      } elsif ($command eq "status") {
           %iphost = &Apache::lonnet::get_iphost();
         my $response=`/bin/cat /home/httpd/perl/logs/*.pid 2>&1`;          my $response=`/bin/cat /home/httpd/perl/logs/*.pid 2>&1`;
         if ($response=~/No such file or directory/) {          if ($response=~/No such file or directory/) {
     print 'LON-CAPA is not running.'."\n";      print 'LON-CAPA is not running.'."\n";

Removed from v.1.40  
changed lines
  Added in v.1.41


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>