version 1.11, 2003/09/16 21:01:39
|
version 1.12, 2003/10/14 15:36:21
|
Line 51 sub stop_daemon {
|
Line 51 sub stop_daemon {
|
if (($command eq "restart") or ($command eq "reload")) { |
if (($command eq "restart") or ($command eq "reload")) { |
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','lonhttpd') { |
foreach my $daemon ('lonsql','lond','lonc','loncnew','lonhttpd') { |
&stop_daemon($daemon); |
&stop_daemon($daemon); |
} |
} |
print 'Starting LON-CAPA client and daemon processes (please be patient)'. |
print 'Starting LON-CAPA client and daemon processes (please be patient)'. |
"\n"; |
"\n"; |
system("su -c '/home/httpd/perl/loncron' www"); |
system("su -c '/home/httpd/perl/loncron' www"); |
} |
} |
|
elsif (($command eq "restartnew") or ($command eq "reloadnew")) { |
|
print 'Restarting LON-CAPA'."\n"; |
|
print 'Ending LON-CAPA client and daemon processes'."\n"; |
|
foreach my $daemon ('lonsql','lond','lonc','loncnew','lonhttpd') { |
|
&stop_daemon($daemon); |
|
} |
|
print 'Starting LON-CAPA client and daemon processes (please be patient)'. |
|
"\n"; |
|
system("su -c '/home/httpd/perl/loncron new' www"); |
|
} |
elsif ($command eq "stop") { |
elsif ($command eq "stop") { |
print 'Stopping LON-CAPA'."\n"; |
print 'Stopping LON-CAPA'."\n"; |
foreach my $daemon ('lonsql','lond','lonc','lonhttpd') { |
foreach my $daemon ('lonsql','lond','lonc','loncnew','lonhttpd') { |
&stop_daemon($daemon); |
&stop_daemon($daemon); |
} |
} |
} |
} |
Line 70 elsif ($command eq "start") {
|
Line 80 elsif ($command eq "start") {
|
"\n"; |
"\n"; |
system("su -c '/home/httpd/perl/loncron' www"); |
system("su -c '/home/httpd/perl/loncron' www"); |
} |
} |
|
elsif ($command eq "startnew") { |
|
print 'Starting LON-CAPA'."\n"; |
|
print 'Starting LON-CAPA client and daemon processes (please be patient)'. |
|
"\n"; |
|
system("su -c '/home/httpd/perl/loncron new' www"); |
|
} |
elsif ($command eq "status") { |
elsif ($command eq "status") { |
$response=`/bin/cat /home/httpd/perl/logs/*.pid 2>&1`; |
$response=`/bin/cat /home/httpd/perl/logs/*.pid 2>&1`; |
if ($response=~/No such file or directory/) { |
if ($response=~/No such file or directory/) { |