[Fedora-directory-commits] dsmlgw/src/com/netscape/dsml/gateway Configuration.java, 1.2, 1.3
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv2523/dsmlgw/src/com/netscape/dsml/gateway
Modified Files:
Configuration.java
Log Message:
change log level from WARNING to CONFIG
Index: Configuration.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/Configuration.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Configuration.java 18 Apr 2008 16:43:39 -0000 1.2
+++ Configuration.java 25 Apr 2008 21:04:37 -0000 1.3
@@ -144,7 +144,7 @@
} catch (java.io.FileNotFoundException e) {
- logger.log(Level.WARNING, "Can't find properties file: " + propertiesFilename);
+ logger.log(Level.CONFIG, "Can't find properties file: " + propertiesFilename);
throw e;
} catch (java.io.IOException e) {
15 years, 5 months
[Fedora-directory-commits] dsmlgw/scripts dsml2ldif.in, NONE, 1.1 ldif2dsml.in, NONE, 1.1
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28804/dsmlgw/scripts
Added Files:
dsml2ldif.in ldif2dsml.in
Log Message:
added dsml2ldif and ldif2dsml scripts
--- NEW FILE dsml2ldif.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
#
CP=@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/dsmlgw.jar:@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/ldapjdk.jar
# it seems that most java 1.5 and later JREs already have a built-in sax implementation
# if you need to specify another one, just specify the SAXJARS env var
# SAXJARS=/path/to/xml-parser.jar dsml2ldif file.dsml
if [ -n "$SAXJARS" ] ; then
CP=${CP}:$SAXJARS
fi
@runtime_javahome@/bin/java -cp "$CP" com.netscape.xmltools.DSML2LDIF "$@"
--- NEW FILE ldif2dsml.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
#
CP=@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/dsmlgw.jar:@dsmlgwdatadir@/webapps/axis/WEB-INF/lib/ldapjdk.jar
# it seems that most java 1.5 and later JREs already have a built-in sax implementation
# if you need to specify another one, just specify the SAXJARS env var
# SAXJARS=/path/to/xml-parser.jar dsml2ldif file.dsml
if [ -n "$SAXJARS" ] ; then
CP=${CP}:$SAXJARS
fi
@runtime_javahome@/bin/java -cp "$CP" com.netscape.xmltools.LDIF2DSML "$@"
15 years, 5 months
[Fedora-directory-commits] dsmlgw build.xml,1.8,1.9
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28804/dsmlgw
Modified Files:
build.xml
Log Message:
added dsml2ldif and ldif2dsml scripts
Index: build.xml
===================================================================
RCS file: /cvs/dirsec/dsmlgw/build.xml,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- build.xml 24 Apr 2008 21:52:40 -0000 1.8
+++ build.xml 25 Apr 2008 02:28:09 -0000 1.9
@@ -220,6 +220,12 @@
<copyfilter file="scripts/dsmlgw-search.in"
tofile="${pkg.dir}${dsmlgwbindir}/dsmlgw-search"/>
<chmod file="${pkg.dir}${dsmlgwbindir}/dsmlgw-search" perm="0755"/>
+ <copyfilter file="scripts/dsml2ldif.in"
+ tofile="${pkg.dir}${dsmlgwbindir}/dsml2ldif"/>
+ <chmod file="${pkg.dir}${dsmlgwbindir}/dsml2ldif" perm="0755"/>
+ <copyfilter file="scripts/ldif2dsml.in"
+ tofile="${pkg.dir}${dsmlgwbindir}/ldif2dsml"/>
+ <chmod file="${pkg.dir}${dsmlgwbindir}/ldif2dsml" perm="0755"/>
<copy file="misc/dsmlgw.cfg" todir="${pkg.dir}${dsmlgwconfigdir}"/>
<chmod file="${pkg.dir}${dsmlgwconfigdir}/dsmlgw.cfg" perm="0644"/>
<copy todir="${pkg.dir}${dsmlgwdatadir}/data">
15 years, 5 months
[Fedora-directory-commits] dsmlgw/scripts dsmlgw-search.in,1.1,1.2
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18678/dsmlgw/scripts
Modified Files:
dsmlgw-search.in
Log Message:
added dsml data files to package - fix minor bugs in dsmlgw-search
Index: dsmlgw-search.in
===================================================================
RCS file: /cvs/dirsec/dsmlgw/scripts/dsmlgw-search.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dsmlgw-search.in 24 Apr 2008 21:39:10 -0000 1.1
+++ dsmlgw-search.in 24 Apr 2008 21:52:41 -0000 1.2
@@ -31,7 +31,7 @@
base=no_suffix_supplied
filter='(objectclass=*)'
-while [ "$1" ] ; do
+while [ -n "$1" ] ; do
case "$1" in
-h) shift; hostname="$1" ;;
-p) shift; port="$1" ;;
@@ -67,9 +67,9 @@
<filter><present name="objectclass"/></filter>
EOF
-if [ "$1" ] ; then
+if [ -n "$1" ] ; then
echo "<attributes>" >> $tmpdsml
- while [ "$1" ] ; do
+ while [ -n "$1" ] ; do
echo "<attribute name="\"$1\""/>" >> $tmpdsml
shift
done
@@ -85,7 +85,7 @@
dsmlgwlibdir=@dsmlgwdatadir@/webapps/axis/WEB-INF/lib
for file in $dsmlgwlibdir/*.jar ; do
- if [ "$AXISCP" ] ; then
+ if [ -n "$AXISCP" ] ; then
AXISCP=${AXISCP}:$file
else
AXISCP=$file
15 years, 5 months
[Fedora-directory-commits] dsmlgw build.xml,1.7,1.8
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18678/dsmlgw
Modified Files:
build.xml
Log Message:
added dsml data files to package - fix minor bugs in dsmlgw-search
Index: build.xml
===================================================================
RCS file: /cvs/dirsec/dsmlgw/build.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- build.xml 24 Apr 2008 21:39:10 -0000 1.7
+++ build.xml 24 Apr 2008 21:52:40 -0000 1.8
@@ -196,6 +196,7 @@
<target name="makepkg" description="create the distribution package" depends="makewar">
<mkdir dir="${pkg.dir}${dsmlgwdatadir}/webapps/axis"/>
+ <mkdir dir="${pkg.dir}${dsmlgwdatadir}/data"/>
<mkdir dir="${pkg.dir}${dsmlgwconfigdir}"/>
<mkdir dir="${pkg.dir}${dsmlgwlogdir}"/>
<mkdir dir="${pkg.dir}${dsmlgwrundir}"/>
@@ -221,6 +222,11 @@
<chmod file="${pkg.dir}${dsmlgwbindir}/dsmlgw-search" perm="0755"/>
<copy file="misc/dsmlgw.cfg" todir="${pkg.dir}${dsmlgwconfigdir}"/>
<chmod file="${pkg.dir}${dsmlgwconfigdir}/dsmlgw.cfg" perm="0644"/>
+ <copy todir="${pkg.dir}${dsmlgwdatadir}/data">
+ <fileset dir="dsml">
+ <include name="*.dsml"/>
+ </fileset>
+ </copy>
<tar destfile="${dist.dir}/${ant.project.name}-${version}.tar"
basedir="${pkg.dir}"/>
<gzip zipfile="${dist.dir}/${ant.project.name}-${version}.tar.gz"
15 years, 5 months
[Fedora-directory-commits] dsmlgw/src/com/netscape/dsml/gateway gatewayHandler.java, 1.2, 1.3
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18285/dsmlgw/src/com/netscape/dsml/gateway
Modified Files:
gatewayHandler.java
Log Message:
move scripts to new scripts directory - add very simple dsmlgw-search script to test dsmlgw - remove some error messages
Index: gatewayHandler.java
===================================================================
RCS file: /cvs/dirsec/dsmlgw/src/com/netscape/dsml/gateway/gatewayHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- gatewayHandler.java 18 Apr 2008 16:43:39 -0000 1.2
+++ gatewayHandler.java 24 Apr 2008 21:39:11 -0000 1.3
@@ -41,11 +41,11 @@
public gatewayHandler() {
super();
- System.err.println("gatewayHandler.gatewayHandler: logger class " +
- "is " + logger.getClass().getCanonicalName() +
- " logger name is " + logger.getName() +
- " parent class is " + logger.getParent().getClass().getCanonicalName() +
- " parent name is " + logger.getParent().getName());
+// System.err.println("gatewayHandler.gatewayHandler: logger class " +
+// "is " + logger.getClass().getCanonicalName() +
+// " logger name is " + logger.getName() +
+// " parent class is " + logger.getParent().getClass().getCanonicalName() +
+// " parent name is " + logger.getParent().getName());
logger.entering("gatewayHandler", "gatewayHandler");
try {
15 years, 5 months
[Fedora-directory-commits] dsmlgw/misc dsmlgw.env.in, 1.1, NONE restart-ds-dsmlgw.in, 1.1, NONE setup-ds-dsmlgw.in, 1.3, NONE start-ds-dsmlgw.in, 1.4, NONE stop-ds-dsmlgw.in, 1.1, NONE
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/misc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18285/dsmlgw/misc
Removed Files:
dsmlgw.env.in restart-ds-dsmlgw.in setup-ds-dsmlgw.in
start-ds-dsmlgw.in stop-ds-dsmlgw.in
Log Message:
move scripts to new scripts directory - add very simple dsmlgw-search script to test dsmlgw - remove some error messages
--- dsmlgw.env.in DELETED ---
--- restart-ds-dsmlgw.in DELETED ---
--- setup-ds-dsmlgw.in DELETED ---
--- start-ds-dsmlgw.in DELETED ---
--- stop-ds-dsmlgw.in DELETED ---
15 years, 5 months
[Fedora-directory-commits] dsmlgw build.fhs.properties, 1.1, 1.2 build.fhsopt.properties, 1.1, 1.2 build.prefix.properties, 1.1, 1.2 build.xml, 1.6, 1.7
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18285/dsmlgw
Modified Files:
build.fhs.properties build.fhsopt.properties
build.prefix.properties build.xml
Log Message:
move scripts to new scripts directory - add very simple dsmlgw-search script to test dsmlgw - remove some error messages
Index: build.fhs.properties
===================================================================
RCS file: /cvs/dirsec/dsmlgw/build.fhs.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.fhs.properties 23 Apr 2008 16:55:58 -0000 1.1
+++ build.fhs.properties 24 Apr 2008 21:39:10 -0000 1.2
@@ -4,3 +4,4 @@
dsmlgwlogdir=/var/log/${project.name.base}/${ant.project.name}
dsmlgwrundir=/var/run/${project.name.base}/${ant.project.name}
dsmlgwsbindir=${prefix}/sbin
+dsmlgwbindir=${prefix}/bin
Index: build.fhsopt.properties
===================================================================
RCS file: /cvs/dirsec/dsmlgw/build.fhsopt.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.fhsopt.properties 23 Apr 2008 16:55:58 -0000 1.1
+++ build.fhsopt.properties 24 Apr 2008 21:39:10 -0000 1.2
@@ -3,3 +3,4 @@
dsmlgwlogdir=/var${prefix}/${ant.project.name}/log
dsmlgwrundir=/var${prefix}/${ant.project.name}/run
dsmlgwsbindir=${prefix}/sbin
+dsmlgwbindir=${prefix}/bin
Index: build.prefix.properties
===================================================================
RCS file: /cvs/dirsec/dsmlgw/build.prefix.properties,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- build.prefix.properties 23 Apr 2008 16:55:58 -0000 1.1
+++ build.prefix.properties 24 Apr 2008 21:39:10 -0000 1.2
@@ -3,3 +3,4 @@
dsmlgwlogdir=${prefix}/log/${ant.project.name}
dsmlgwrundir=${prefix}/run/${ant.project.name}
dsmlgwsbindir=${prefix}/sbin
+dsmlgwbindir=${prefix}/bin
Index: build.xml
===================================================================
RCS file: /cvs/dirsec/dsmlgw/build.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- build.xml 24 Apr 2008 14:54:25 -0000 1.6
+++ build.xml 24 Apr 2008 21:39:10 -0000 1.7
@@ -201,21 +201,24 @@
<mkdir dir="${pkg.dir}${dsmlgwrundir}"/>
<mkdir dir="${pkg.dir}${dsmlgwsbindir}"/>
<unjar src="${dist.dir}/dsmlgw.war" dest="${pkg.dir}${dsmlgwdatadir}/webapps/axis"/>
- <copyfilter file="misc/setup-ds-dsmlgw.in"
+ <copyfilter file="scripts/setup-ds-dsmlgw.in"
tofile="${pkg.dir}${dsmlgwsbindir}/setup-ds-dsmlgw"/>
<chmod file="${pkg.dir}${dsmlgwsbindir}/setup-ds-dsmlgw" perm="0755"/>
- <copyfilter file="misc/start-ds-dsmlgw.in"
+ <copyfilter file="scripts/start-ds-dsmlgw.in"
tofile="${pkg.dir}${dsmlgwsbindir}/start-ds-dsmlgw"/>
<chmod file="${pkg.dir}${dsmlgwsbindir}/start-ds-dsmlgw" perm="0755"/>
- <copyfilter file="misc/stop-ds-dsmlgw.in"
+ <copyfilter file="scripts/stop-ds-dsmlgw.in"
tofile="${pkg.dir}${dsmlgwsbindir}/stop-ds-dsmlgw"/>
<chmod file="${pkg.dir}${dsmlgwsbindir}/stop-ds-dsmlgw" perm="0755"/>
- <copyfilter file="misc/restart-ds-dsmlgw.in"
+ <copyfilter file="scripts/restart-ds-dsmlgw.in"
tofile="${pkg.dir}${dsmlgwsbindir}/restart-ds-dsmlgw"/>
<chmod file="${pkg.dir}${dsmlgwsbindir}/restart-ds-dsmlgw" perm="0755"/>
- <copyfilter file="misc/dsmlgw.env.in"
+ <copyfilter file="scripts/dsmlgw.env.in"
tofile="${pkg.dir}${dsmlgwconfigdir}/dsmlgw.env"/>
<chmod file="${pkg.dir}${dsmlgwconfigdir}/dsmlgw.env" perm="0644"/>
+ <copyfilter file="scripts/dsmlgw-search.in"
+ tofile="${pkg.dir}${dsmlgwbindir}/dsmlgw-search"/>
+ <chmod file="${pkg.dir}${dsmlgwbindir}/dsmlgw-search" perm="0755"/>
<copy file="misc/dsmlgw.cfg" todir="${pkg.dir}${dsmlgwconfigdir}"/>
<chmod file="${pkg.dir}${dsmlgwconfigdir}/dsmlgw.cfg" perm="0644"/>
<tar destfile="${dist.dir}/${ant.project.name}-${version}.tar"
15 years, 5 months
[Fedora-directory-commits] dsmlgw/scripts dsmlgw-search.in, NONE, 1.1 dsmlgw.env.in, NONE, 1.1 restart-ds-dsmlgw.in, NONE, 1.1 setup-ds-dsmlgw.in, NONE, 1.1 start-ds-dsmlgw.in, NONE, 1.1 stop-ds-dsmlgw.in, NONE, 1.1
by Doctor Conrad
Author: rmeggins
Update of /cvs/dirsec/dsmlgw/scripts
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18285/dsmlgw/scripts
Added Files:
dsmlgw-search.in dsmlgw.env.in restart-ds-dsmlgw.in
setup-ds-dsmlgw.in start-ds-dsmlgw.in stop-ds-dsmlgw.in
Log Message:
move scripts to new scripts directory - add very simple dsmlgw-search script to test dsmlgw - remove some error messages
--- NEW FILE dsmlgw-search.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
#
usage()
{
echo $1
echo Usage: $0 [-h host] [-p port] [-s scope] [-b base] [filter] [attributes . . .]
exit 1
}
hostname=localhost
port=8081
scope=sub
base=no_suffix_supplied
filter='(objectclass=*)'
while [ "$1" ] ; do
case "$1" in
-h) shift; hostname="$1" ;;
-p) shift; port="$1" ;;
-s) shift; scope="$1" ;;
-b) shift; base="$1" ;;
*) filter="$1"; shift; break;;
esac
shift
done
#echo $0 -h $hostname -p $port -s $scope -b $base \"$filter\" "$@"
dsmlscope=wholeSubtree
case "$scope" in
base) dsmlscope=baseObject ;;
one) dsmlscope=singleLevel ;;
sub) dsmlscope=wholeSubtree ;;
esac
tmpdsml=/tmp/dsml.$$
cat > $tmpdsml <<EOF
<?xml version='1.0' encoding='UTF-8'?>
<soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap-env:Body>
<batchRequest xmlns="urn:oasis:names:tc:DSML:2:0:core">
<searchRequest dn="$base" scope="$scope" derefAliases="neverDerefAliases">
<filter><present name="objectclass"/></filter>
EOF
if [ "$1" ] ; then
echo "<attributes>" >> $tmpdsml
while [ "$1" ] ; do
echo "<attribute name="\"$1\""/>" >> $tmpdsml
shift
done
echo "</attributes>" >> $tmpdsml
fi
cat >> $tmpdsml <<EOF
</searchRequest>
</batchRequest>
</soap-env:Body>
</soap-env:Envelope>
EOF
dsmlgwlibdir=@dsmlgwdatadir@/webapps/axis/WEB-INF/lib
for file in $dsmlgwlibdir/*.jar ; do
if [ "$AXISCP" ] ; then
AXISCP=${AXISCP}:$file
else
AXISCP=$file
fi
done
@runtime_javahome@/bin/java -cp "$AXISCP" com.netscape.dsml.test.dsmlSearch http://$hostname:$port/axis/services/dsmlgw $tmpdsml
rm -f $tmpdsml
--- NEW FILE dsmlgw.env.in ---
# This file sets up the environment which the dsmlgw will use
if [ -z "$DSMLGW_CONFIG_DIR" ] ; then
DSMLGW_CONFIG_DIR=@dsmlgwconfigdir@
export DSMLGW_CONFIG_DIR
fi
if [ -z "$CATALINA_HOME" ] ; then
CATALINA_HOME=@dsmlgwdatadir@
export CATALINA_HOME
fi
if [ -z "$CATALINA_PID" ] ; then
CATALINA_PID=@dsmlgwrundir@/@package_name@.pid
export CATALINA_PID
fi
if [ -z "$TOMCAT_USER" ] ; then
TOMCAT_USER=@dsmlgwuser@
export TOMCAT_USER
fi
if [ -z "$CATALINA_TEMP" ] ; then
CATALINA_TEMP=@dsmlgwrundir@/temp
export CATALINA_TEMP
fi
if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=@runtime_javahome@
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH
export PATH
fi
--- 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 setup-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
#
###########################
#
# The general strategy is to create an "instance" of tomcat, so that we
# can use our own logs directory, pid directory, etc. and can run as a
# user of our choosing rather than the default tomcat user
#
##########################
echo '######################################################################'
echo This shell script will configure the DSML Gateway Axis service, as
echo a web application running under Tomcat.
echo
getValFromInf() {
cattr=$1
cfile=$2
rval=`grep ^$cattr $cfile | head -1 | sed -e "s/^$cattr[ ]*=[ ]*//"`
echo $rval
}
getValFromConf() {
cattr=$1
cfile=$2
rval=`grep ^$cattr $cfile | head -1 | sed -e "s/^$cattr[ ]*//"`
echo $rval
}
getValFromLdif() {
cattr=$1
cfile=$2
num=${3:-1}
rval=`grep -i ^$cattr: $cfile | head -$num | sed -e "s/^..*:[ ]*//"`
echo $rval
}
# e.g. /etc/dirsrv/dsmlgw
dsmlgwconfigdir="@dsmlgwconfigdir@"
dsmlgwlogdir="@dsmlgwlogdir@"
dsmlgwrundir="@dsmlgwrundir@"
basecfgdir=`dirname $dsmlgwconfigdir`
securitydir="@dsmlgwconfigdir@"
# see if there is a $dsmlgwconfigdir/../admin-serv
admservdir=$basecfgdir/admin-serv
if [ -f "$admservdir/local.conf" ] ; then
echo Reading parameters from Administration Server config . . .
host=`getValFromLdif serverHostName "$admservdir/local.conf"`
sec=`getValFromLdif configuration.nsServerSecurity "$admservdir/local.conf"`
if [ "$sec" = "on" -a ! -f $securitydir/cert8.db ] ; then
cp $admservdir/cert8.db $securitydir
fi
dsmlgwuser=`ls -l $admservdir/local.conf | awk '{print $3}'`
dsmlgwgroup=`ls -l $admservdir/local.conf | awk '{print $4}'`
else
echo
echo '########################################################################'
echo Error: It appears the Administration Server has not yet been configured.
echo There are configuration files missing from $admservdir
echo Please run setup-ds-admin.pl to create your Administration Server
echo then run this script again.
exit 1
fi
# see if there are any directory servers here
for dir in $basecfgdir/slapd-* ; do
case "$dir" in
*.deleted) continue ;;
esac
if [ -d "$dir" -a -f "$dir/dse.ldif" ] ; then
echo Reading parameters from Directory Server $dir . . .
dirmgr=`getValFromLdif nsslapd-rootdn "$dir/dse.ldif"`
host=`getValFromLdif nsslapd-localhost "$dir/dse.ldif"`
sec=`getValFromLdif nsslapd-security "$dir/dse.ldif"`
if [ "$sec" = "on" ] ; then
port=`getValFromLdif nsslapd-secureport "$dir/dse.ldif"`
ldapurl="ldaps://$host:$port"
if [ ! -f $securitydir/cert8.db ] ; then
cp $dir/cert8.db $securitydir
fi
else
port=`getValFromLdif nsslapd-port "$dir/dse.ldif"`
ldapurl="ldap://$host:$port"
fi
if [ -z "$dsmlgwuser" ] ; then
dsmlgwuser=`ls -l $dir/dse.ldif | awk '{print $3}'`
fi
if [ -z "$dsmlgwgroup" ] ; then
dsmlgwgroup=`ls -l $dir/dse.ldif | awk '{print $4}'`
fi
fi
done
if [ -n "$ldapurl" ] ; then
echo Using Directory Server URL $ldapurl
fi
# get command line arguments
inffile=
nextisinffile=
reconfig=
for arg in "$@" ; do
if [ "$arg" = "-r" ]; then
reconfig=1
elif [ "$arg" = "-f" ]; then
nextisinffile=1
elif [ $nextisinffile ]; then
inffile="$arg"
nextisinffile=
fi
done
tomcat_home=@tomcat_home@
if [ -z "$tomcat_home" -o ! -d "$tomcat_home" ] ; then
echo ERROR: tomcat_home is not set to the tomcat directory
exit 1
fi
# CATALINA_HOME points to @datadir@/dsmlgw
# these are the directories we need in order to run an instance of tomcat
# bin server common shared conf temp webapps logs work
# these directories will just be symlinks to the actual tomcat dir - they
# are mostly read-only: bin server common shared conf
# webapps will be a real directory and will contain axis + dsmlgw
# logs will point to the dirsrv/dsmlgw logs directory
# temp and work will point to the run/dsmlgw directory
dsmlgwdir=@dsmlgwdatadir@
for dir in bin server common shared conf ; do
if [ -d $dsmlgwdir/$dir ] ; then
echo $dsmlgwdir/$dir exists, skipping . . .
else
ln -s $tomcat_home/$dir $dsmlgwdir/$dir
fi
done
if [ -d $dsmlgwdir/logs ] ; then
echo $dsmlgwdir/logs exists, skipping . . .
else
ln -s @dsmlgwlogdir@ $dsmlgwdir/logs
fi
for dir in temp work ; do
if [ -d $dsmlgwdir/$dir ] ; then
echo $dsmlgwdir/$dir exists, skipping . . .
else
ln -s @dsmlgwrundir@ $dsmlgwdir/$dir
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`
port=`getValFromInf ServerPort $inffile`
dirmgr=`getValFromInf RootDN $inffile`
ldapurl="ldap://$host:$port"
infuser=`getValFromInf SysUser $inffile`
infgroup=`getValFromInf SysGroup $inffile`
if [ -z "$infuser" ] ; then
infuser=`getValFromInf SuiteSpotUserID $inffile`
fi
if [ -z "$infgroup" ] ; then
infgroup=`getValFromInf SuiteSpotGroup $inffile`
fi
if [ -n "$infuser" ] ; then
dsmlgwuser="$infuser"
fi
if [ -n "$infgroup" ] ; then
dsmlgwgroup="$infgroup"
fi
echo Using parameters from file $inffile . . .
echo Using Directory Server URL $ldapurl . . .
fi
if [ -z "$reconfig" -a -f $dsmlgwconfigdir/dsmlgw.cfg ] ; then
echo
echo '######################################################################'
echo The DSML Gateway has already been configured. The
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.
exit 1
fi
echo Generating config file $dsmlgwconfigdir/dsmlgw.cfg . . .
# generate dsmlgw.cfg in the $dsmlgwconfigdir directory
rm -f $dsmlgwconfigdir/dsmlgw.cfg
echo ServerHost=$host > $dsmlgwconfigdir/dsmlgw.cfg
echo ServerPort=$port >> $dsmlgwconfigdir/dsmlgw.cfg
echo BindDN=$rootdn >> $dsmlgwconfigdir/dsmlgw.cfg
echo BindPW= >> $dsmlgwconfigdir/dsmlgw.cfg
echo Updating the user information in $dsmlgwconfigdir/dsmlgw.env . . .
cp $dsmlgwconfigdir/dsmlgw.env $dsmlgwconfigdir/dsmlgw.env.orig
sed -e "s/TOMCAT_USER=.*/TOMCAT_USER=$dsmlgwuser/" $dsmlgwconfigdir/dsmlgw.env.orig > $dsmlgwconfigdir/dsmlgw.env
chown -R $dsmlgwuser:$dsmlgwgroup $dsmlgwconfigdir
chown -R $dsmlgwuser:$dsmlgwgroup $dsmlgwlogdir
chown -R $dsmlgwuser:$dsmlgwgroup $dsmlgwrundir
chmod 0400 $dsmlgwconfigdir/dsmlgw.cfg
echo
echo The DSML Gateway has been successfully configured.
echo '######################################################################'
exit 0
--- NEW FILE start-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
#
# first, look for the shell script config file
# if not found, punt
# source env. for dsmlgw
[ -f @dsmlgwconfigdir(a)/dsmlgw.env ] && . @dsmlgwconfigdir(a)/dsmlgw.env
# if root, use su to execute the startup script - user is set in @initconfigdir@/@package_name@
myuid=`id | cut -f1 -d' '`
if [ "$myuid" = 'uid=0(root)' ] ; then
su $TOMCAT_USER -c "@tomcat_cmd@ $@"
else
@tomcat_cmd@ $@
fi
--- 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(a)/dsmlgw.env ] && . @dsmlgwconfigdir(a)/dsmlgw.env
kill `cat $CATALINA_PID`
15 years, 5 months