Issue #2886 Removed httpd-collaboration rpm Installation and added collab-dataserver
rpm to replace it. Changed dependency references to httpd-collaboration to refer to collab-dataserver. Amend: Updated call to status in init script. Redirect start.sh error output to an error file. Use macro to define ant opts in component.spec. Change-Id: I73369dc3e9079a1732ae9d06229d3135f82ef2f4 Former-commit-id:4fa60427b4
[formerly d7466d36140c94b5ef4e57fea25526231912e018] Former-commit-id:f0189d61ca
This commit is contained in:
parent
c3164b9f89
commit
3954cd6bae
15 changed files with 201 additions and 2318 deletions
|
@ -1,11 +1,15 @@
|
||||||
<project default="deploy" basedir=".">
|
<project default="deploy" basedir=".">
|
||||||
|
|
||||||
<property name="workspace" value="${basedir}/../.." />
|
<property name="workspace" value="${basedir}/../.." />
|
||||||
<property name="esb.build.directory" value="${workspace}/edexOsgi/build.edex" />
|
<property name="workspace_edexOsgi" value="${workspace}/edexOsgi"/>
|
||||||
|
<property name="workspace_javaUtilities" value="${workspace}/javaUtilities"/>
|
||||||
|
<property name="workspace_cots" value="${workspace}/cots" />
|
||||||
|
|
||||||
|
<property name="esb.build.directory" value="${workspace_edexOsgi}/build.edex" />
|
||||||
<property name="feature.file" value="${basedir}.feature/feature.xml" />
|
<property name="feature.file" value="${basedir}.feature/feature.xml" />
|
||||||
<property name="dataserver.root.directory" value="/awips2/collab-dataserver" />
|
<property name="dataserver.root.directory" value="/awips2/collab-dataserver" />
|
||||||
<property name="includegen.filter" value="raytheon|collaboration.dataserver" />
|
<property name="includegen.filter" value="raytheon|collaboration.dataserver" />
|
||||||
<property name="basedirectories" value="${workspace}/edexOsgi;${workspace}/javaUtilities;${workspace}/cots" />
|
<property name="basedirectories" value="${workspace_edexOsgi};${workspace_javaUtilities};${workspace_cots}" />
|
||||||
|
|
||||||
<property name="tmp.dir" value="/tmp/collab-dataserver" />
|
<property name="tmp.dir" value="/tmp/collab-dataserver" />
|
||||||
<property name="includes.directory" value="${tmp.dir}/includes" />
|
<property name="includes.directory" value="${tmp.dir}/includes" />
|
||||||
|
@ -85,12 +89,12 @@
|
||||||
<includegen providerfilter="${includegen.filter}" basedirectories="${basedirectories}" featurefile="${feature.file}" cotsout="${includes.directory}/cots.includes" plugsout="${includes.directory}/plugins.includes" coreout="${includes.directory}/core.includes" />
|
<includegen providerfilter="${includegen.filter}" basedirectories="${basedirectories}" featurefile="${feature.file}" cotsout="${includes.directory}/cots.includes" plugsout="${includes.directory}/plugins.includes" coreout="${includes.directory}/core.includes" />
|
||||||
|
|
||||||
<!-- copy foss jars to tmp lib folder -->
|
<!-- copy foss jars to tmp lib folder -->
|
||||||
<copyToBuild includes.file="${includes.directory}/cots.includes" source.base="${workspace}/cots" source.suffix="" includes.pattern="*.jar" target.dir="${tmp.lib.dir}" />
|
<copyToBuild includes.file="${includes.directory}/cots.includes" source.base="${workspace_cots}" source.suffix="" includes.pattern="*.jar" target.dir="${tmp.lib.dir}" />
|
||||||
|
|
||||||
<!-- copy all uframe source to tmp src folder -->
|
<!-- copy all uframe source to tmp src folder -->
|
||||||
<copyToBuild includes.file="${includes.directory}/core.includes" source.base="${workspace}/edexOsgi" source.suffix="src" includes.pattern="**/*.java" target.dir="${tmp.src.dir}" />
|
<copyToBuild includes.file="${includes.directory}/core.includes" source.base="${workspace_edexOsgi}" source.suffix="src" includes.pattern="**/*.java" target.dir="${tmp.src.dir}" />
|
||||||
|
|
||||||
<copyToBuild includes.file="${includes.directory}/plugins.includes" source.base="${workspace}/edexOsgi" source.suffix="src" includes.pattern="**/*.java" target.dir="${tmp.src.dir}" />
|
<copyToBuild includes.file="${includes.directory}/plugins.includes" source.base="${workspace_edexOsgi}" source.suffix="src" includes.pattern="**/*.java" target.dir="${tmp.src.dir}" />
|
||||||
|
|
||||||
<copy todir="${tmp.src.dir}" overwrite="true" verbose="true">
|
<copy todir="${tmp.src.dir}" overwrite="true" verbose="true">
|
||||||
<fileset dir="src" includes="**/*.java" />
|
<fileset dir="src" includes="**/*.java" />
|
||||||
|
|
|
@ -45,7 +45,7 @@ then
|
||||||
echo "PID file already exists at $PIDFILE, exiting"
|
echo "PID file already exists at $PIDFILE, exiting"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
nohup java $dbArg $logLevel -server -cp lib/uframe/*:lib/foss/* com.raytheon.collaboration.dataserver.DataserverMain &
|
nohup java $dbArg $logLevel -server -cp lib/uframe/*:lib/foss/* com.raytheon.collaboration.dataserver.DataserverMain > /dev/null 2>collab-dataserver.err &
|
||||||
|
|
||||||
echo $! > $PIDFILE
|
echo $! > $PIDFILE
|
||||||
)
|
)
|
||||||
|
|
44
javaUtilities/collaboration.dataserver/scriptBin/status.sh
Normal file
44
javaUtilities/collaboration.dataserver/scriptBin/status.sh
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# This software was developed and / or modified by Raytheon Company,
|
||||||
|
# pursuant to Contract DG133W-05-CQ-1067 with the US Government.
|
||||||
|
#
|
||||||
|
# U.S. EXPORT CONTROLLED TECHNICAL DATA
|
||||||
|
# This software product contains export-restricted data whose
|
||||||
|
# export/transfer/disclosure is restricted by U.S. law. Dissemination
|
||||||
|
# to non-U.S. persons whether in the United States or abroad requires
|
||||||
|
# an export license or other authorization.
|
||||||
|
#
|
||||||
|
# Contractor Name: Raytheon Company
|
||||||
|
# Contractor Address: 6825 Pine Street, Suite 340
|
||||||
|
# Mail Stop B8
|
||||||
|
# Omaha, NE 68106
|
||||||
|
# 402.291.0100
|
||||||
|
#
|
||||||
|
# See the AWIPS II Master Rights File ("Master Rights File.pdf") for
|
||||||
|
# further licensing information.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# SOFTWARE HISTORY
|
||||||
|
# Date Ticket# Engineer Description
|
||||||
|
# ------------ ---------- ----------- --------------------------
|
||||||
|
# Apr 03, 2014 2886 bgonzale Initial creation
|
||||||
|
#
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
(cd $(dirname "$0")/..
|
||||||
|
PIDFILE=collabserver.pid
|
||||||
|
|
||||||
|
if [[ -e $PIDFILE ]]; then
|
||||||
|
PIDID=`cat $PIDFILE`
|
||||||
|
PROCESS=`ps --pid $PIDID -o args | grep -c "DataserverMain"`
|
||||||
|
if [ $PROCESS -eq 1 ]; then
|
||||||
|
echo "HTTP Collaboration Dataserver is running"
|
||||||
|
else
|
||||||
|
echo "HTTP Collaboration Dataserver is not running"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "HTTP Collaboration Dataserver is not running"
|
||||||
|
fi
|
||||||
|
)
|
84
rpms/awips2.core/Installer.collab-dataserver/component.spec
Normal file
84
rpms/awips2.core/Installer.collab-dataserver/component.spec
Normal file
|
@ -0,0 +1,84 @@
|
||||||
|
%define _ant_opts -Dfile.encoding=iso-8859-1 -Dworkspace='..' -Dworkspace_edexOsgi='..' -Dworkspace_javaUtilities='..' -Dworkspace_cots='..' -Ddataserver.root.directory='${RPM_BUILD_ROOT}/awips2/collab-dataserver'
|
||||||
|
|
||||||
|
Name: awips2-collab-dataserver
|
||||||
|
Summary: AWIPSII Collaboration HTTP Dataserver
|
||||||
|
Version: %{_component_version}
|
||||||
|
Release: %{_component_release}
|
||||||
|
Group: AWIPSII
|
||||||
|
BuildRoot: %{_build_root}
|
||||||
|
BuildArch: %{_build_arch}
|
||||||
|
URL: N/A
|
||||||
|
License: N/A
|
||||||
|
Distribution: N/A
|
||||||
|
Vendor: Raytheon
|
||||||
|
Packager: Bradley Gonzales
|
||||||
|
|
||||||
|
AutoReq: no
|
||||||
|
provides: awips2-collab-dataserver
|
||||||
|
requires: awips2-java, awips2-ant
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{_component_desc}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
# Ensure that a "buildroot" has been specified.
|
||||||
|
if [ "%{_build_root}" = "" ]; then
|
||||||
|
echo "ERROR: A BuildRoot has not been specified."
|
||||||
|
echo "FATAL: Unable to Continue ... Terminating."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d %{_build_root} ]; then
|
||||||
|
rm -rf %{_build_root}
|
||||||
|
fi
|
||||||
|
/bin/mkdir -p %{_build_root}
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
%build
|
||||||
|
cd %{_baseline_workspace}/collaboration.dataserver
|
||||||
|
export ANT_OPTS="%{_ant_opts}"
|
||||||
|
/awips2/ant/bin/ant -f build.xml build
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
%install
|
||||||
|
cd %{_baseline_workspace}/collaboration.dataserver
|
||||||
|
export ANT_OPTS="%{_ant_opts}"
|
||||||
|
/awips2/ant/bin/ant -f build.xml deploy
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%post
|
||||||
|
%preun
|
||||||
|
%postun
|
||||||
|
|
||||||
|
%clean
|
||||||
|
cd %{_baseline_workspace}/collaboration.dataserver
|
||||||
|
export ANT_OPTS="%{_ant_opts}"
|
||||||
|
/awips2/ant/bin/ant -f build.xml clean
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
rm -rf ${RPM_BUILD_ROOT}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(644,awips,fxalpha,755)
|
||||||
|
%dir /awips2
|
||||||
|
%dir /awips2/collab-dataserver
|
||||||
|
%dir /awips2/collab-dataserver/bin
|
||||||
|
/awips2/collab-dataserver/bin/*
|
||||||
|
%dir /awips2/collab-dataserver/lib
|
||||||
|
/awips2/collab-dataserver/lib/*
|
||||||
|
|
||||||
|
%defattr(775,awips,fxalpha,775)
|
||||||
|
%dir /awips2/collab-dataserver/lib/uframe
|
||||||
|
/awips2/collab-dataserver/lib/uframe/*
|
||||||
|
%dir /awips2/collab-dataserver/lib/foss
|
||||||
|
/awips2/collab-dataserver/lib/foss/*
|
||||||
|
%dir /awips2/collab-dataserver/config
|
||||||
|
/awips2/collab-dataserver/config/*
|
|
@ -0,0 +1,57 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Startup script for the HTTP Collaboration Dataserver servlet
|
||||||
|
#
|
||||||
|
# chkconfig: - 85 15
|
||||||
|
# description: Servlet for storing and retrieving collaboration data objects.
|
||||||
|
# processname: collabserver
|
||||||
|
# pidfile: /var/run/collabserver.pid
|
||||||
|
|
||||||
|
# Source function library.
|
||||||
|
. /etc/rc.d/init.d/functions
|
||||||
|
|
||||||
|
COLLAB_BIN=/awips2/collab-dataserver/bin
|
||||||
|
PROG=`basename $0`
|
||||||
|
|
||||||
|
start() {
|
||||||
|
echo -n $"Starting HTTP Collaboration Dataserver"
|
||||||
|
# start.sh script starts the service using nohup.
|
||||||
|
${COLLAB_BIN}/start.sh
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
status() {
|
||||||
|
${COLLAB_BIN}/status.sh
|
||||||
|
return $?
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
echo -n $"Stopping HTTP Collaboration Dataserver"
|
||||||
|
${COLLAB_BIN}/stop.sh
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
# See how we were called.
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
start
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
stop
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
status)
|
||||||
|
status $httpd
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
restart)
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
RETVAL=$?
|
||||||
|
;;
|
||||||
|
echo $"Usage: $PROG {start|stop|restart|status}"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit $RETVAL
|
|
@ -1,126 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# httpd Startup script for the Apache HTTP Server used by Openfire
|
|
||||||
#
|
|
||||||
# chkconfig: - 85 15
|
|
||||||
# description: Apache is a World Wide Web server. It is used to serve \
|
|
||||||
# HTML files and CGI.
|
|
||||||
# processname: httpd
|
|
||||||
# config: /etc/httpd/conf/httpd.conf
|
|
||||||
# config: /etc/sysconfig/httpd
|
|
||||||
# pidfile: /var/run/httpd.pid
|
|
||||||
|
|
||||||
# Source function library.
|
|
||||||
. /etc/rc.d/init.d/functions
|
|
||||||
|
|
||||||
if [ -f /etc/sysconfig/httpd ]; then
|
|
||||||
. /etc/sysconfig/httpd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start httpd in the C locale by default.
|
|
||||||
HTTPD_LANG=${HTTPD_LANG-"C"}
|
|
||||||
|
|
||||||
# This will prevent initlog from swallowing up a pass-phrase prompt if
|
|
||||||
# mod_ssl needs a pass-phrase from the user.
|
|
||||||
INITLOG_ARGS=""
|
|
||||||
|
|
||||||
# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
|
|
||||||
# with the thread-based "worker" MPM; BE WARNED that some modules may not
|
|
||||||
# work correctly with a thread-based MPM; notably PHP will refuse to start.
|
|
||||||
|
|
||||||
# Path to the apachectl script, server binary, and short-form for messages.
|
|
||||||
apachectl=/awips2/httpd_openfire/usr/sbin/apachectl
|
|
||||||
httpd=${HTTPD-/awips2/httpd_openfire/usr/sbin/httpd}
|
|
||||||
prog=httpd
|
|
||||||
pidfile=${PIDFILE-/awips2/httpd_openfire/var/run/httpd.pid}
|
|
||||||
lockfile=${LOCKFILE-/awips2/httpd_openfire/var/lock/subsys/httpd}
|
|
||||||
RETVAL=0
|
|
||||||
|
|
||||||
# check for 1.3 configuration
|
|
||||||
check13 () {
|
|
||||||
CONFFILE=/awips2/httpd_openfire/etc/httpd/conf/httpd.conf
|
|
||||||
GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|"
|
|
||||||
GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|"
|
|
||||||
GONE="${GONE}AccessConfig|ResourceConfig)"
|
|
||||||
if LANG=C grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then
|
|
||||||
echo
|
|
||||||
echo 1>&2 " Apache 1.3 configuration directives found"
|
|
||||||
echo 1>&2 " please read @docdir@/migration.html"
|
|
||||||
failure "Apache 1.3 config directives test"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# The semantics of these two functions differ from the way apachectl does
|
|
||||||
# things -- attempting to start while running is a failure, and shutdown
|
|
||||||
# when not running is also a failure. So we just do it the way init scripts
|
|
||||||
# are expected to behave here.
|
|
||||||
start() {
|
|
||||||
echo -n $"Starting $prog: "
|
|
||||||
check13 || exit 1
|
|
||||||
LANG=$HTTPD_LANG daemon $httpd $OPTIONS
|
|
||||||
RETVAL=$?
|
|
||||||
echo
|
|
||||||
[ $RETVAL = 0 ] && touch ${lockfile}
|
|
||||||
return $RETVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
# When stopping httpd a delay of >10 second is required before SIGKILLing the
|
|
||||||
# httpd parent; this gives enough time for the httpd parent to SIGKILL any
|
|
||||||
# errant children.
|
|
||||||
stop() {
|
|
||||||
echo -n $"Stopping $prog: "
|
|
||||||
killproc -d 10 $httpd
|
|
||||||
RETVAL=$?
|
|
||||||
echo
|
|
||||||
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
|
|
||||||
}
|
|
||||||
reload() {
|
|
||||||
echo -n $"Reloading $prog: "
|
|
||||||
if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
|
|
||||||
RETVAL=$?
|
|
||||||
echo $"not reloading due to configuration syntax error"
|
|
||||||
failure $"not reloading $httpd due to configuration syntax error"
|
|
||||||
else
|
|
||||||
killproc $httpd -HUP
|
|
||||||
RETVAL=$?
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
# See how we were called.
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
stop
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status $httpd
|
|
||||||
RETVAL=$?
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
condrestart)
|
|
||||||
if [ -f ${pidfile} ] ; then
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
reload)
|
|
||||||
reload
|
|
||||||
;;
|
|
||||||
graceful|help|configtest|fullstatus)
|
|
||||||
$apachectl $@
|
|
||||||
RETVAL=$?
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $RETVAL
|
|
|
@ -1,8 +0,0 @@
|
||||||
/awips2/httpd_openfire/var/log/httpd/*log {
|
|
||||||
missingok
|
|
||||||
notifempty
|
|
||||||
sharedscripts
|
|
||||||
postrotate
|
|
||||||
/sbin/service httpd-pypies reload > /dev/null 2>/dev/null || true
|
|
||||||
endscript
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,3 +0,0 @@
|
||||||
<Location /session_data>
|
|
||||||
Dav On
|
|
||||||
</Location>
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,141 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# httpd Startup script for the Apache HTTP Server used by Collaboration
|
|
||||||
#
|
|
||||||
# chkconfig: - 85 15
|
|
||||||
# description: Apache is a World Wide Web server. It is used to serve \
|
|
||||||
# HTML files and CGI.
|
|
||||||
# processname: httpd
|
|
||||||
# config: /etc/httpd/conf/httpd.conf
|
|
||||||
# config: /etc/sysconfig/httpd
|
|
||||||
# pidfile: /var/run/httpd.pid
|
|
||||||
|
|
||||||
# Source function library.
|
|
||||||
. /etc/rc.d/init.d/functions
|
|
||||||
|
|
||||||
if [ -f /etc/sysconfig/httpd ]; then
|
|
||||||
. /etc/sysconfig/httpd
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Start httpd in the C locale by default.
|
|
||||||
HTTPD_LANG=${HTTPD_LANG-"C"}
|
|
||||||
|
|
||||||
# This will prevent initlog from swallowing up a pass-phrase prompt if
|
|
||||||
# mod_ssl needs a pass-phrase from the user.
|
|
||||||
INITLOG_ARGS=""
|
|
||||||
|
|
||||||
# Set HTTPD=/usr/sbin/httpd.worker in /etc/sysconfig/httpd to use a server
|
|
||||||
# with the thread-based "worker" MPM; BE WARNED that some modules may not
|
|
||||||
# work correctly with a thread-based MPM; notably PHP will refuse to start.
|
|
||||||
|
|
||||||
HTTPD_COLLABORATION_INSTALL="/awips2/httpd_collaboration"
|
|
||||||
|
|
||||||
# Path to the apachectl script, server binary, and short-form for messages.
|
|
||||||
apachectl=${HTTPD_COLLABORATION_INSTALL}/usr/sbin/apachectl
|
|
||||||
httpd=${HTTPD-${HTTPD_COLLABORATION_INSTALL}/usr/sbin/httpd}
|
|
||||||
prog=httpd
|
|
||||||
pidfile=${PIDFILE-${HTTPD_COLLABORATION_INSTALL}/var/run/httpd.pid}
|
|
||||||
lockfile=${LOCKFILE-${HTTPD_COLLABORATION_INSTALL}/var/lock/subsys/httpd}
|
|
||||||
RETVAL=0
|
|
||||||
PYTHON_INSTALL="/awips2/python"
|
|
||||||
|
|
||||||
# Add to LD_LIBRARY_PATH, if necessary.
|
|
||||||
PYTHON_LIB_DIR="${PYTHON_INSTALL}/lib"
|
|
||||||
|
|
||||||
# Determine if LD_LIBRARY_PATH needs to be updated.
|
|
||||||
echo $LD_LIBRARY_PATH | grep "${PYTHON_LIB_DIR}" > /dev/null 2>&1
|
|
||||||
RC="$?"
|
|
||||||
if [ ! "${RC}" = "0" ]; then
|
|
||||||
export LD_LIBRARY_PATH=${PYTHON_LIB_DIR}:$LD_LIBRARY_PATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# check for 1.3 configuration
|
|
||||||
check13 () {
|
|
||||||
CONFFILE=${HTTPD_COLLABORATION_INSTALL}/etc/httpd/conf/httpd.conf
|
|
||||||
GONE="(ServerType|BindAddress|Port|AddModule|ClearModuleList|"
|
|
||||||
GONE="${GONE}AgentLog|RefererLog|RefererIgnore|FancyIndexing|"
|
|
||||||
GONE="${GONE}AccessConfig|ResourceConfig)"
|
|
||||||
if LANG=C grep -Eiq "^[[:space:]]*($GONE)" $CONFFILE; then
|
|
||||||
echo
|
|
||||||
echo 1>&2 " Apache 1.3 configuration directives found"
|
|
||||||
echo 1>&2 " please read /usr/share/doc/awips2-collaboration-2.2.3/migration.html"
|
|
||||||
failure "Apache 1.3 config directives test"
|
|
||||||
echo
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# The semantics of these two functions differ from the way apachectl does
|
|
||||||
# things -- attempting to start while running is a failure, and shutdown
|
|
||||||
# when not running is also a failure. So we just do it the way init scripts
|
|
||||||
# are expected to behave here.
|
|
||||||
start() {
|
|
||||||
echo -n $"Starting $prog: "
|
|
||||||
check13 || exit 1
|
|
||||||
LANG=$HTTPD_LANG daemon $httpd $OPTIONS -f \
|
|
||||||
${HTTPD_COLLABORATION_INSTALL}/etc/httpd/conf/httpd.conf
|
|
||||||
RETVAL=$?
|
|
||||||
echo
|
|
||||||
[ $RETVAL = 0 ] && touch ${lockfile}
|
|
||||||
return $RETVAL
|
|
||||||
}
|
|
||||||
|
|
||||||
# When stopping httpd a delay of >10 second is required before SIGKILLing the
|
|
||||||
# httpd parent; this gives enough time for the httpd parent to SIGKILL any
|
|
||||||
# errant children.
|
|
||||||
stop() {
|
|
||||||
echo -n $"Stopping $prog: "
|
|
||||||
killproc -d 10 $httpd
|
|
||||||
RETVAL=$?
|
|
||||||
echo
|
|
||||||
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
reload() {
|
|
||||||
echo -n $"Reloading $prog: "
|
|
||||||
if ! LANG=$HTTPD_LANG $httpd $OPTIONS -t >&/dev/null; then
|
|
||||||
RETVAL=$?
|
|
||||||
echo $"not reloading due to configuration syntax error"
|
|
||||||
failure $"not reloading $httpd due to configuration syntax error"
|
|
||||||
else
|
|
||||||
killproc $httpd -HUP
|
|
||||||
RETVAL=$?
|
|
||||||
fi
|
|
||||||
echo
|
|
||||||
}
|
|
||||||
|
|
||||||
# See how we were called.
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
stop
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
status $httpd
|
|
||||||
RETVAL=$?
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
;;
|
|
||||||
condrestart)
|
|
||||||
if [ -f ${pidfile} ] ; then
|
|
||||||
stop
|
|
||||||
start
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
reload)
|
|
||||||
reload
|
|
||||||
;;
|
|
||||||
graceful|help|configtest|fullstatus)
|
|
||||||
$apachectl $@
|
|
||||||
RETVAL=$?
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo $"Usage: $prog {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}"
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit $RETVAL
|
|
|
@ -24,7 +24,7 @@ Packager: Bryan Kowal
|
||||||
|
|
||||||
AutoReq: no
|
AutoReq: no
|
||||||
requires: awips2-java
|
requires: awips2-java
|
||||||
requires: awips2-httpd-collaboration
|
requires: awips2-collab-dataserver
|
||||||
provides: awips2-%{_xmpp_server}
|
provides: awips2-%{_xmpp_server}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
|
|
|
@ -249,8 +249,8 @@ function lookupRPM()
|
||||||
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.xmpp"
|
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.xmpp"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
if [ "${1}" = "awips2-httpd-collaboration" ]; then
|
if [ "${1}" = "awips2-collab-dataserver" ]; then
|
||||||
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.httpd-collaboration"
|
export RPM_SPECIFICATION="${awips2_core_dir}/Installer.collab-dataserver"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -272,7 +272,7 @@ if [ "${1}" = "-full" ]; then
|
||||||
buildRPM "awips2-tools"
|
buildRPM "awips2-tools"
|
||||||
buildRPM "awips2-edex-environment"
|
buildRPM "awips2-edex-environment"
|
||||||
buildRPM "awips2-openfire"
|
buildRPM "awips2-openfire"
|
||||||
buildRPM "awips2-httpd-collaboration"
|
buildRPM "awips2-collab-dataserver"
|
||||||
buildRPM "awips2-python-shapely"
|
buildRPM "awips2-python-shapely"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -171,7 +171,7 @@ if [ "${1}" = "-rh6" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
buildRPM "awips2-httpd-pypies"
|
buildRPM "awips2-httpd-pypies"
|
||||||
buildRPM "awips2-httpd-collaboration"
|
buildRPM "awips2-collab-dataserver"
|
||||||
buildQPID
|
buildQPID
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue