[LON-CAPA-cvs] cvs: loncom /init.d loncontrol

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 11 May 2004 21:22:04 -0000


albertel		Tue May 11 17:22:04 2004 EDT

  Modified files:              
    /loncom/init.d	loncontrol 
  Log:
  - use new argument mode
  - re/start now don't test the connections
  - status now does a conenction status check
  
  
Index: loncom/init.d/loncontrol
diff -u loncom/init.d/loncontrol:1.17 loncom/init.d/loncontrol:1.18
--- loncom/init.d/loncontrol:1.17	Thu Apr  1 17:14:42 2004
+++ loncom/init.d/loncontrol	Tue May 11 17:22:04 2004
@@ -56,7 +56,7 @@
     }
     print 'Starting LON-CAPA client and daemon processes (please be patient)'.
 	"\n";
-    system("su www -c '/home/httpd/perl/loncron'");
+    system("su www -c '/home/httpd/perl/loncron --oldlonc --justcheckdaemons'");
 } elsif (($command eq "restart") or ($command eq "reload")) {
     print 'Restarting LON-CAPA'."\n";
     print 'Ending LON-CAPA client and daemon processes'."\n";
@@ -65,7 +65,7 @@
     }
     print 'Starting LON-CAPA client and daemon processes (please be patient)'.
 	"\n";
-    system("su www -c '/home/httpd/perl/loncron new'");
+    system("su www -c '/home/httpd/perl/loncron --justcheckdaemons'");
 } elsif ($command eq "stop") {
     print 'Stopping LON-CAPA'."\n";
     foreach my $daemon ('lonsql','lond','lonc','lonhttpd') {
@@ -75,21 +75,20 @@
     print 'Starting LON-CAPA'."\n";
     print 'Starting LON-CAPA client and daemon processes (please be patient)'.
 	"\n"; 
-    system("su www -c '/home/httpd/perl/loncron'");
+    system("su www -c '/home/httpd/perl/loncron --oldlonc --justcheckdaemons'");
 } elsif ($command eq "start") {
     print 'Starting LON-CAPA'."\n";
     print 'Starting LON-CAPA client and daemon processes (please be patient)'.
 	"\n"; 
-    system("su www -c '/home/httpd/perl/loncron new'");
+    system("su www -c '/home/httpd/perl/loncron --justcheckdaemons'");
 } elsif ($command eq "status") {
     $response=`/bin/cat /home/httpd/perl/logs/*.pid 2>&1`;
     if ($response=~/No such file or directory/) {
 	print 'LON-CAPA is not running.'."\n";
-    }
-    else {
+    } else {
 	print 'LON-CAPA is running.'."\n";
+	system("su www -c '/home/httpd/perl/loncron --justcheckconnections'");
     }
 } else {
-    print 'You need to specify restart|stop|start|status on the command line'.
-	' argument.'."\n";
+    print 'You need to specify one of restart|stop|start|status on the command line.'."\n";
 }