--- loncom/init.d/loncontrol 2015/09/20 18:31:33 1.44 +++ loncom/init.d/loncontrol 2018/08/07 17:12:17 1.45 @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# $Id: loncontrol,v 1.44 2015/09/20 18:31:33 raeburn Exp $ +# $Id: loncontrol,v 1.45 2018/08/07 17:12:17 raeburn Exp $ # # The LearningOnline Network with CAPA # @@ -93,6 +93,9 @@ sub stop_daemon { print(", killed off extraneous processes"); } unlink($pidfile); + if ($killallname eq 'loncnew') { + &clean_nossl_loncpids(); + } print("\n"); } @@ -107,6 +110,22 @@ sub clean_sockets { } } +sub clean_nossl_loncpids { + my $childpiddir = '/home/httpd/perl/logs/loncpids'; + my $nossldir = '/home/httpd/sockets/nosslverify'; + foreach my $dir ($childpiddir,$nossldir) { + if (-d $dir) { + if (opendir(my $dh,$dir)) { + while (my $fname=readdir($dh)) { + next if ($fname =~ /^\./); + unlink("$dir/$fname"); + } + closedir($dh); + } + } + } +} + if (($command eq "restart") || ($command eq 'stop') || ($command eq 'start') || ($command eq "status")) { my $iptables = &LONCAPA::Firewall::get_pathto_iptables();