Diff for /loncom/init.d/loncontrol between versions 1.34.2.1 and 1.35

version 1.34.2.1, 2010/01/13 19:26:54 version 1.35, 2009/04/22 14:58:59
Line 32 Line 32
 # chkconfig: 345 95 5  # chkconfig: 345 95 5
 # description: LON-CAPA is a "network of knowledge".  It is used to \  # description: LON-CAPA is a "network of knowledge".  It is used to \
 # distribute knowledge resources and instructional management.  # distribute knowledge resources and instructional management.
 # processnames: lonc, lond, lonsql, lonmaxima  # processnames: lonc, lond, lonsql, lonmaxima, lonr
 # pidfiles: /home/httpd/perl/logs/lon*.pid  # pidfiles: /home/httpd/perl/logs/lon*.pid
 # config: /etc/httpd/conf/loncapa.conf  # config: /etc/httpd/conf/loncapa.conf
 # config: /home/httpd/lonTabs/hosts.tab  # config: /home/httpd/lonTabs/hosts.tab
Line 67  $ENV{'BASH_ENV'}=""; Line 67  $ENV{'BASH_ENV'}="";
  }   }
     }      }
     my $suse_config = "/etc/sysconfig/SuSEfirewall2";      my $suse_config = "/etc/sysconfig/SuSEfirewall2";
     if (-e $suse_config) {      if (!-e $suse_config) {
         $fw_chain = 'input_ext';  
     } else {  
         if (!-e '/etc/sysconfig/iptables') {          if (!-e '/etc/sysconfig/iptables') {
             print("Unable to find iptables file containing static definitions\n");              print("Unable to find iptables file containing static definitions\n");
         }          }
     }      }
     if (-e $iptables) {  
         my $count = `$iptables -L -n 2>/dev/null |grep $fw_chain |wc -l`;  
         chomp($count);  
         if (!$count) {  
             $fw_chain ='INPUT';  
         }  
     }  
     my $lond_port = &get_lond_port();      my $lond_port = &get_lond_port();
     if (!$lond_port) {      if (!$lond_port) {
         print("Unable to determine lond port number from LON-CAPA configuration.\n");          print("Unable to determine lond port number from LON-CAPA configuration.\n");
Line 252  sub clean_sockets { Line 243  sub clean_sockets {
 if ($command eq "restart") {  if ($command eq "restart") {
     print 'Restarting LON-CAPA'."\n";      print 'Restarting LON-CAPA'."\n";
     print 'Ending LON-CAPA client and daemon processes'."\n";      print 'Ending LON-CAPA client and daemon processes'."\n";
     foreach my $daemon ('lonsql','lond','lonc','lonmemcached','lonmaxima') {      foreach my $daemon ('lonsql','lond','lonc','lonmemcached','lonmaxima','lonr') {
  my $killallname=$daemon;   my $killallname=$daemon;
  if ($daemon eq 'lonc') { $killallname='loncnew'; }   if ($daemon eq 'lonc') { $killallname='loncnew'; }
  &stop_daemon($daemon,$killallname);   &stop_daemon($daemon,$killallname);
Line 262  if ($command eq "restart") { Line 253  if ($command eq "restart") {
     system("su www -c '/home/httpd/perl/loncron --justcheckdaemons'");      system("su www -c '/home/httpd/perl/loncron --justcheckdaemons'");
 } elsif ($command eq "stop") {  } elsif ($command eq "stop") {
     print 'Stopping LON-CAPA'."\n";      print 'Stopping LON-CAPA'."\n";
     foreach my $daemon ('lonsql','lond','lonc','lonmemcached','lonmaxima') {      foreach my $daemon ('lonsql','lond','lonc','lonmemcached','lonmaxima','lonr') {
  my $killallname=$daemon;   my $killallname=$daemon;
  if ($daemon eq 'lonc') { $killallname='loncnew'; }   if ($daemon eq 'lonc') { $killallname='loncnew'; }
  &stop_daemon($daemon,$killallname);   &stop_daemon($daemon,$killallname);

Removed from v.1.34.2.1  
changed lines
  Added in v.1.35


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