--- loncom/loncron 2004/05/11 21:08:55 1.49 +++ loncom/loncron 2004/05/11 21:14:23 1.50 @@ -2,7 +2,7 @@ # Housekeeping program, started by cron, loncontrol and loncron.pl # -# $Id: loncron,v 1.49 2004/05/11 21:08:55 albertel Exp $ +# $Id: loncron,v 1.50 2004/05/11 21:14:23 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -77,9 +77,9 @@ ENDERROUT } sub start_daemon { - my ($fh,$daemon,$pidfile) = @_; + my ($fh,$daemon,$pidfile,$args) = @_; my $progname=$daemon; - if ($daemon eq 'lonc' && $ARGV[0] eq 'new') { + if ($daemon eq 'lonc' && $args eq 'new') { $progname='loncnew'; print "new "; } @@ -103,7 +103,7 @@ sub start_daemon { } sub checkon_daemon { - my ($fh,$daemon,$maxsize,$sendusr1)=@_; + my ($fh,$daemon,$maxsize,$sendusr1,$args)=@_; &log($fh,'
');
printf("%-10s ",$daemon);
@@ -152,7 +152,7 @@ sub checkon_daemon {
'
');
&log($fh,"$daemon not running, trying to start
");
- if (&start_daemon($fh,$daemon,$pidfile)) {
+ if (&start_daemon($fh,$daemon,$pidfile,$args)) {
&log($fh,"$daemon at pid $daemonpid responding
");
$simplestatus{$daemon}='restarted';
print "started\n";
@@ -161,7 +161,7 @@ sub checkon_daemon {
&log($fh,"$daemon at pid $daemonpid not responding
");
&log($fh,"
Give it one more try ...
"); print " "; - if (&start_daemon($fh,$daemon,$pidfile)) { + if (&start_daemon($fh,$daemon,$pidfile,$args)) { &log($fh,"