[Fedora-directory-commits] dsmlgw/misc restart-ds-dsmlgw.in, NONE, 1.1 stop-ds-dsmlgw.in, NONE, 1.1 setup-ds-dsmlgw.in, 1.2, 1.3 start-ds-dsmlgw.in, 1.3, 1.4

Richard Allen Megginson (rmeggins) fedora-directory-commits at redhat.com
Wed Apr 23 21:38:06 UTC 2008


Author: rmeggins

Update of /cvs/dirsec/dsmlgw/misc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv13196/dsmlgw/misc

Modified Files:
	setup-ds-dsmlgw.in start-ds-dsmlgw.in 
Added Files:
	restart-ds-dsmlgw.in stop-ds-dsmlgw.in 
Log Message:
added restart and stop commands - clean up setup, start, and build.xml


--- NEW FILE restart-ds-dsmlgw.in ---
#!/bin/sh
#
# BEGIN COPYRIGHT BLOCK
# This Program 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; version 2 of the License.
# 
# This Program 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.
# 
# You should have received a copy of the GNU General Public License along with
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
# 
# Copyright (C) 2006 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#

@dsmlgwsbindir@/stop-ds-dsmlgw
@dsmlgwsbindir@/start-ds-dsmlgw


--- NEW FILE stop-ds-dsmlgw.in ---
#!/bin/sh
#
# BEGIN COPYRIGHT BLOCK
# This Program 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; version 2 of the License.
# 
# This Program 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.
# 
# You should have received a copy of the GNU General Public License along with
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
# 
# Copyright (C) 2006 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#

# source env. for dsmlgw
[ -f @dsmlgwconfigdir@/dsmlgw.env ] && . @dsmlgwconfigdir@/dsmlgw.env

kill `cat $CATALINA_PID`


Index: setup-ds-dsmlgw.in
===================================================================
RCS file: /cvs/dirsec/dsmlgw/misc/setup-ds-dsmlgw.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- setup-ds-dsmlgw.in	23 Apr 2008 18:28:26 -0000	1.2
+++ setup-ds-dsmlgw.in	23 Apr 2008 21:38:03 -0000	1.3
@@ -169,6 +169,12 @@
     fi
 done
 
+# tomcat needs the webapps/ROOT directory too
+if [ -d $dsmlgwdir/webapps/ROOT ] ; then
+    echo $dsmlgwdir/webapps/ROOT exists, skipping . . .
+else
+    ln -s $tomcat_home/webapps/ROOT $dsmlgwdir/webapps/ROOT
+fi
 
 if [ -f "$inffile" ] ; then
     hostname=`getValFromInf FullMachineName $inffile`
@@ -200,7 +206,7 @@
     echo file $dsmlgwconfigdir/dsmlgw.cfg
     echo exists already.  If you want to force a reconfiguration, removing
     echo your existing configuration and recreating it, run this script
-    echo again with the "-r" argument.
+    echo again with the \"-r\" argument.
     exit 1
 fi
 


Index: start-ds-dsmlgw.in
===================================================================
RCS file: /cvs/dirsec/dsmlgw/misc/start-ds-dsmlgw.in,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- start-ds-dsmlgw.in	23 Apr 2008 18:29:21 -0000	1.3
+++ start-ds-dsmlgw.in	23 Apr 2008 21:38:03 -0000	1.4
@@ -25,7 +25,8 @@
 [ -f @dsmlgwconfigdir@/dsmlgw.env ] && . @dsmlgwconfigdir@/dsmlgw.env
 
 # if root, use su to execute the startup script - user is set in @initconfigdir@/@package_name@
-if [ "$USER" = "root" ] ; then
+myuid=`id | cut -f1 -d' '`
+if [ "$myuid" = 'uid=0(root)' ] ; then
     su $TOMCAT_USER -c "@tomcat_cmd@ $@"
 else
     @tomcat_cmd@ $@




More information about the Fedora-directory-commits mailing list