--- loncom/init.d/loncontrol 2010/01/13 19:26:54 1.34.2.1 +++ loncom/init.d/loncontrol 2009/04/22 14:58:59 1.35 @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# $Id: loncontrol,v 1.34.2.1 2010/01/13 19:26:54 raeburn Exp $ +# $Id: loncontrol,v 1.35 2009/04/22 14:58:59 raeburn Exp $ # # The LearningOnline Network with CAPA # @@ -32,7 +32,7 @@ # chkconfig: 345 95 5 # description: LON-CAPA is a "network of knowledge". It is used to \ # distribute knowledge resources and instructional management. -# processnames: lonc, lond, lonsql, lonmaxima +# processnames: lonc, lond, lonsql, lonmaxima, lonr # pidfiles: /home/httpd/perl/logs/lon*.pid # config: /etc/httpd/conf/loncapa.conf # config: /home/httpd/lonTabs/hosts.tab @@ -67,20 +67,11 @@ $ENV{'BASH_ENV'}=""; } } my $suse_config = "/etc/sysconfig/SuSEfirewall2"; - if (-e $suse_config) { - $fw_chain = 'input_ext'; - } else { + if (!-e $suse_config) { if (!-e '/etc/sysconfig/iptables') { 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(); if (!$lond_port) { print("Unable to determine lond port number from LON-CAPA configuration.\n"); @@ -252,7 +243,7 @@ sub clean_sockets { if ($command eq "restart") { print 'Restarting LON-CAPA'."\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; if ($daemon eq 'lonc') { $killallname='loncnew'; } &stop_daemon($daemon,$killallname); @@ -262,7 +253,7 @@ if ($command eq "restart") { system("su www -c '/home/httpd/perl/loncron --justcheckdaemons'"); } elsif ($command eq "stop") { 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; if ($daemon eq 'lonc') { $killallname='loncnew'; } &stop_daemon($daemon,$killallname);