[LON-CAPA-cvs] cvs: loncom / lcuseradd

www lon-capa-cvs@mail.lon-capa.org
Mon, 09 Dec 2002 16:15:51 -0000


www		Mon Dec  9 11:15:51 2002 EDT

  Modified files:              
    /loncom	lcuseradd 
  Log:
  Checking in for TESTING only - move to lower version for 0.6 if not
  sufficiently tested.
  
  This sends USR1 to the Apache parent process on a server where a new
  filesystem authenticated user is generated. The purpose is to re-init
  the group associations.
  
  
Index: loncom/lcuseradd
diff -u loncom/lcuseradd:1.23 loncom/lcuseradd:1.24
--- loncom/lcuseradd:1.23	Wed Sep 18 22:02:59 2002
+++ loncom/lcuseradd	Mon Dec  9 11:15:51 2002
@@ -18,7 +18,7 @@
 #        o LonCapa will add it if/when the user is granted an Author
 #          role.
 #
-# $Id: lcuseradd,v 1.23 2002/09/19 02:02:59 foxr Exp $
+# $Id: lcuseradd,v 1.24 2002/12/09 16:15:51 www Exp $
 ###
 
 ###############################################################################
@@ -269,27 +269,28 @@
 <title>$safeusername</title>
 </head>
 <body>
-<h1>$safeusername</h1>
-<p>
-Learning Online Network
-</p>
-<p>
-This area provides for:
-</p>
-<ul>
-<li>resource construction</li>
-<li>resource publication</li>
-<li>record-keeping</li>
-</ul>
+<h1>Construction Space</h1>
+<h3>$safeusername</h3>
 </body>
 </html>
 END
 close OUT;
 
-print "lcuseradd exiting\n" unless $noprint;
+print "lcuseradd ownership\n" unless $noprint;
 system('/bin/chown','-R',"$safeusername:$safeusername","/home/$safeusername");
-
+# ---------------------------------------------------- Gracefull Apache Restart
+if (-e '/var/run/httpd.pid') {
+    print "lcuseradd Apache restart\n" unless $noprint;
+    open(PID,'/var/run/httpd.pid');
+    my $pid=<PID>;
+    close(PID);
+    $pid=~s/\D+//g;
+    if ($pid) {
+	system('kill','-USR1',"$pid");
+    }
+}
 # -------------------------------------------------------- Exit script
+print "lcuseradd exiting\n" unless $noprint;
 &disable_root_capability;
 exit 0;