[LON-CAPA-cvs] cvs: loncom / apachereload
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 31 Oct 2005 16:13:46 -0000
albertel Mon Oct 31 11:13:46 2005 EDT
Modified files:
/loncom apachereload
Log:
- load the config files
Index: loncom/apachereload
diff -u loncom/apachereload:1.3 loncom/apachereload:1.4
--- loncom/apachereload:1.3 Mon Jul 11 11:29:46 2005
+++ loncom/apachereload Mon Oct 31 11:13:45 2005
@@ -3,27 +3,30 @@
#
# apachereload - setuid script that reloads the apache daemon.
#
+# $Id: apachereload,v 1.4 2005/10/31 16:13:45 albertel Exp $
#
-# $Id
+# Copyright Michigan State University Board of Trustees
#
-# Change log:
-# $Log: apachereload,v $
-# Revision 1.3 2005/07/11 15:29:46 albertel
-# - it's like I was drunk
+# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
#
-# Revision 1.2 2005/07/07 22:26:52 albertel
-# - suse has apache not httpd
+# LON-CAPA is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
#
-# Revision 1.1 2003/09/30 10:06:48 foxr
-# This is a setuid script that allows the www user to issue
-# /etc/init.d/httpd reload
+# LON-CAPA is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
#
-# This functionality is required by lond and lonc when they have been asked to
-# reinitialize themselves.
+# You should have received a copy of the GNU General Public License
+# along with LON-CAPA; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-# Initial undebugged version.
+# /home/httpd/html/adm/gpl.txt
+#
+# http://www.lon-capa.org/
#
-###
use strict;
@@ -38,6 +41,11 @@
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; # nullify potential taints
my $command = "/etc/init.d/httpd reload";
+
+use lib '/home/httpd/lib/perl/';
+use LONCAPA::Configuration;
+my %perlvar= %{&LONCAPA::Configuration::read_conf('loncapa.conf')};
+
my $dist=`$perlvar{'lonDaemons'}/distprobe`;
if ($dist =~ /^(suse|sles)/) {
$command = "/etc/init.d/apache reload";