Issue #2182 - PostgreSQL port is now configurable in postgresql.conf; Java path is no longer relative in wrapper.conf
Amend: wrap file access in try..finally; move StringBuilder outside of a loop Change-Id: Iafa7493ef79a0a891f36923f1695cefdb47e16da Former-commit-id:0c3b22c8f2
[formerly43008f4698
] [formerly0c3b22c8f2
[formerly43008f4698
] [formerly120ebd045a
[formerly 71f74d7b8125994537ef5520fe59134a7f86e9af]]] Former-commit-id:120ebd045a
Former-commit-id:68181d3f62
[formerlyfac9d72cc8
] Former-commit-id:9e0e6662c8
This commit is contained in:
parent
4bd12a5840
commit
fad82481c1
12 changed files with 643 additions and 563 deletions
|
@ -4,6 +4,7 @@
|
||||||
<property name="src" value="src"></property>
|
<property name="src" value="src"></property>
|
||||||
<property name="db.mach.name" value="localhost"/>
|
<property name="db.mach.name" value="localhost"/>
|
||||||
<property name="database" value="hd_ob83krf" />
|
<property name="database" value="hd_ob83krf" />
|
||||||
|
<property name="database.port" value="5432" />
|
||||||
|
|
||||||
|
|
||||||
<target name="runJDbGen">
|
<target name="runJDbGen">
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
<pathelement location="./bin"/>
|
<pathelement location="./bin"/>
|
||||||
<pathelement path="${basedir}/REQUIRED_JARS/postgresql-8.3-603.jdbc3.jar"/>
|
<pathelement path="${basedir}/REQUIRED_JARS/postgresql-8.3-603.jdbc3.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
<arg value="jdbc:postgresql://${db.mach.name}:5432/${database}?user=awips"/> <!-- connectionURL -->
|
<arg value="jdbc:postgresql://${db.mach.name}:${database.port}/${database}?user=awips"/> <!-- connectionURL -->
|
||||||
<arg value="${basedir}/PreferredTableNames.txt"/> <!--preferredTableNameFilePath -->
|
<arg value="${basedir}/PreferredTableNames.txt"/> <!--preferredTableNameFilePath -->
|
||||||
<arg value="${database}"/> <!-- dbName -->
|
<arg value="${database}"/> <!-- dbName -->
|
||||||
<arg value="ohd.hseb.ihfsdb.generated"/> <!-- packageName -->
|
<arg value="ohd.hseb.ihfsdb.generated"/> <!-- packageName -->
|
||||||
|
|
|
@ -34,7 +34,7 @@ wrapper.fork_hack=true
|
||||||
wrapper.console.pipestreams=true
|
wrapper.console.pipestreams=true
|
||||||
|
|
||||||
# Java Application
|
# Java Application
|
||||||
wrapper.java.command=${EDEX_HOME}/../java/bin/java
|
wrapper.java.command=${JAVA_HOME}/bin/java
|
||||||
|
|
||||||
# necessary for etc/init.d/edex_camel
|
# necessary for etc/init.d/edex_camel
|
||||||
wrapper.pidfile=${EDEX_HOME}/bin/${EDEX_RUN_MODE}.pid
|
wrapper.pidfile=${EDEX_HOME}/bin/${EDEX_RUN_MODE}.pid
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,6 +3,7 @@
|
||||||
<property name="dist" value="dist" />
|
<property name="dist" value="dist" />
|
||||||
<property name="src" value="src" />
|
<property name="src" value="src" />
|
||||||
<property name="db.mach.name" value="localhost" />
|
<property name="db.mach.name" value="localhost" />
|
||||||
|
<property name="db.port" value="5432" />
|
||||||
<property name="database" value="hd_ob83oax" />
|
<property name="database" value="hd_ob83oax" />
|
||||||
|
|
||||||
<target name="runJDbGen" depends="prepare">
|
<target name="runJDbGen" depends="prepare">
|
||||||
|
@ -12,7 +13,7 @@
|
||||||
<pathelement location="./classes"/>
|
<pathelement location="./classes"/>
|
||||||
<pathelement path="${basedir}/REQUIRED_JARS/postgresql-8.3-603.jdbc3.jar"/>
|
<pathelement path="${basedir}/REQUIRED_JARS/postgresql-8.3-603.jdbc3.jar"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
<arg value="jdbc:postgresql://${db.mach.name}:5432/${database}?user=awips"/> <!-- connectionURL -->
|
<arg value="jdbc:postgresql://${db.mach.name}:${db.port}/${database}?user=awips"/> <!-- connectionURL -->
|
||||||
<arg value="${basedir}/PreferredTableNames.txt"/> <!--preferredTableNameFilePath -->
|
<arg value="${basedir}/PreferredTableNames.txt"/> <!--preferredTableNameFilePath -->
|
||||||
<arg value="${database}"/> <!-- dbName -->
|
<arg value="${database}"/> <!-- dbName -->
|
||||||
<arg value="ohd.hseb.ihfsdb.generated"/> <!-- packageName -->
|
<arg value="ohd.hseb.ihfsdb.generated"/> <!-- packageName -->
|
||||||
|
|
|
@ -60,7 +60,7 @@ listen_addresses = '*' # what IP address(es) to listen on;
|
||||||
# comma-separated list of addresses;
|
# comma-separated list of addresses;
|
||||||
# defaults to 'localhost'; use '*' for all
|
# defaults to 'localhost'; use '*' for all
|
||||||
# (change requires restart)
|
# (change requires restart)
|
||||||
#port = 5432 # (change requires restart)
|
port = 5432 # (change requires restart)
|
||||||
max_connections = 300 # (change requires restart)
|
max_connections = 300 # (change requires restart)
|
||||||
# Note: Increasing max_connections costs ~400 bytes of shared memory per
|
# Note: Increasing max_connections costs ~400 bytes of shared memory per
|
||||||
# connection slot, plus lock space (see max_locks_per_transaction).
|
# connection slot, plus lock space (see max_locks_per_transaction).
|
||||||
|
|
|
@ -60,7 +60,7 @@ listen_addresses = '*' # what IP address(es) to listen on;
|
||||||
# comma-separated list of addresses;
|
# comma-separated list of addresses;
|
||||||
# defaults to 'localhost'; use '*' for all
|
# defaults to 'localhost'; use '*' for all
|
||||||
# (change requires restart)
|
# (change requires restart)
|
||||||
#port = 5432 # (change requires restart)
|
port = 5432 # (change requires restart)
|
||||||
max_connections = 300 # (change requires restart)
|
max_connections = 300 # (change requires restart)
|
||||||
# Note: Increasing max_connections costs ~400 bytes of shared memory per
|
# Note: Increasing max_connections costs ~400 bytes of shared memory per
|
||||||
# connection slot, plus lock space (see max_locks_per_transaction).
|
# connection slot, plus lock space (see max_locks_per_transaction).
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
Summary: Pypies Apache HTTP Server
|
Summary: Pypies Apache HTTP Server
|
||||||
Name: awips2-httpd-pypies
|
Name: awips2-httpd-pypies
|
||||||
Version: 2.2.15
|
Version: 2.2.15
|
||||||
Release: 15.3.el6
|
Release: 15.3-1.el6
|
||||||
URL: http://httpd.apache.org/
|
URL: http://httpd.apache.org/
|
||||||
Source0: http://archive.apache.org/dist/httpd/httpd-%{version}.tar.gz
|
Source0: http://archive.apache.org/dist/httpd/httpd-%{version}.tar.gz
|
||||||
Source1: index.html
|
Source1: index.html
|
||||||
|
|
|
@ -100,7 +100,9 @@ start() {
|
||||||
|
|
||||||
stop() {
|
stop() {
|
||||||
echo -n $"Stopping $prog: "
|
echo -n $"Stopping $prog: "
|
||||||
/awips2/httpd_pypies/usr/sbin/apachectl -k graceful-stop
|
${HTTPD_PYPIES_INSTALL}/usr/sbin/apachectl -f \
|
||||||
|
${HTTPD_PYPIES_INSTALL}/etc/httpd/conf/httpd.conf \
|
||||||
|
-k graceful-stop
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
echo
|
echo
|
||||||
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
|
[ $RETVAL = 0 ] && rm -f ${lockfile} ${pidfile}
|
||||||
|
@ -148,7 +150,9 @@ reload() {
|
||||||
echo $"not reloading due to configuration syntax error"
|
echo $"not reloading due to configuration syntax error"
|
||||||
failure $"not reloading $httpd due to configuration syntax error"
|
failure $"not reloading $httpd due to configuration syntax error"
|
||||||
else
|
else
|
||||||
/awips2/httpd_pypies/usr/sbin/apachectl -k graceful
|
${HTTPD_PYPIES_INSTALL}/usr/sbin/apachectl -f \
|
||||||
|
${HTTPD_PYPIES_INSTALL}/etc/httpd/conf/httpd.conf \
|
||||||
|
-k graceful
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
|
@ -191,4 +195,4 @@ case "$1" in
|
||||||
exit 1
|
exit 1
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit $RETVAL
|
exit $RETVAL
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
Name: awips2-postgresql
|
Name: awips2-postgresql
|
||||||
Summary: AWIPS II PostgreSQL Distribution
|
Summary: AWIPS II PostgreSQL Distribution
|
||||||
Version: %{_postgresql_version}
|
Version: %{_postgresql_version}
|
||||||
Release: 1.el6
|
Release: 2.el6
|
||||||
Group: AWIPSII
|
Group: AWIPSII
|
||||||
BuildRoot: %{_build_root}
|
BuildRoot: %{_build_root}
|
||||||
BuildArch: %{_build_arch}
|
BuildArch: %{_build_arch}
|
||||||
|
|
|
@ -36,8 +36,6 @@ PGDATA_DIR="${POSTGRESQL_INSTALL_ROOT}/data"
|
||||||
PGDATA="${PGDATA_DIR}"
|
PGDATA="${PGDATA_DIR}"
|
||||||
# Who to run the postmaster as, usually "postgres". (NOT "root")
|
# Who to run the postmaster as, usually "postgres". (NOT "root")
|
||||||
PGUSER=awips
|
PGUSER=awips
|
||||||
# Port to start the database with
|
|
||||||
PGPORT=5432
|
|
||||||
# Where to keep a log file
|
# Where to keep a log file
|
||||||
PGLOG="$PGDATA/serverlog"
|
PGLOG="$PGDATA/serverlog"
|
||||||
# The path that is to be used for the script
|
# The path that is to be used for the script
|
||||||
|
@ -57,29 +55,29 @@ PGCTL="${POSTGRESQL_INSTALL}/bin/pg_ctl"
|
||||||
case $1 in
|
case $1 in
|
||||||
start)
|
start)
|
||||||
echo -n "Starting EDEX PostgreSQL: "
|
echo -n "Starting EDEX PostgreSQL: "
|
||||||
su $PGUSER -c "$DAEMON -D '$PGDATA' -p $PGPORT &" >>$PGLOG 2>&1
|
su $PGUSER -c "$DAEMON -D '$PGDATA' &" >>$PGLOG 2>&1
|
||||||
echo
|
echo
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
echo -n "Stopping EDEX PostgreSQL: "
|
echo -n "Stopping EDEX PostgreSQL: "
|
||||||
su $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast -o \"-p $PGPORT\""
|
su $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast"
|
||||||
echo
|
echo
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
echo -n "Restarting EDEX PostgreSQL: "
|
echo -n "Restarting EDEX PostgreSQL: "
|
||||||
su $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast -w -o \"-p $PGPORT\""
|
su $PGUSER -c "$PGCTL stop -D '$PGDATA' -s -m fast -w"
|
||||||
su $PGUSER -c "$DAEMON -D '$PGDATA' -p $PGPORT &" >>$PGLOG 2>&1
|
su $PGUSER -c "$DAEMON -D '$PGDATA' &" >>$PGLOG 2>&1
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
reload)
|
reload)
|
||||||
echo -n "Reload EDEX PostgreSQL: "
|
echo -n "Reload EDEX PostgreSQL: "
|
||||||
su $PGUSER -c "$PGCTL reload -D '$PGDATA' -s -o \"-p $PGPORT\""
|
su $PGUSER -c "$PGCTL reload -D '$PGDATA' -s"
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
su $PGUSER -c "$PGCTL status -D '$PGDATA' -o \"-p $PGPORT\""
|
su $PGUSER -c "$PGCTL status -D '$PGDATA'"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
# Print help
|
# Print help
|
||||||
|
|
|
@ -11,9 +11,6 @@ prefix="${POSTGRESQL_INSTALL}/postgresql"
|
||||||
# Data Directory
|
# Data Directory
|
||||||
PGDATA="${POSTGRESQL_INSTALL}/data"
|
PGDATA="${POSTGRESQL_INSTALL}/data"
|
||||||
|
|
||||||
# Port to start the database with
|
|
||||||
PGPORT=5432
|
|
||||||
|
|
||||||
# Where to keep a log file
|
# Where to keep a log file
|
||||||
PGLOG="$PGDATA/serverlog"
|
PGLOG="$PGDATA/serverlog"
|
||||||
|
|
||||||
|
@ -40,7 +37,7 @@ set -e
|
||||||
test -x $DAEMON || exit 0
|
test -x $DAEMON || exit 0
|
||||||
|
|
||||||
echo -n "Starting PostgreSQL: "
|
echo -n "Starting PostgreSQL: "
|
||||||
$DAEMON -D $PGDATA -p $PGPORT
|
$DAEMON -D $PGDATA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,9 +11,6 @@ prefix="${POSTGRESQL_INSTALL}/postgresql"
|
||||||
# Data Directory
|
# Data Directory
|
||||||
PGDATA="${POSTGRESQL_INSTALL}/data"
|
PGDATA="${POSTGRESQL_INSTALL}/data"
|
||||||
|
|
||||||
# Port to start the database with
|
|
||||||
PGPORT=5432
|
|
||||||
|
|
||||||
# Where to keep a log file
|
# Where to keep a log file
|
||||||
PGLOG="$PGDATA/serverlog"
|
PGLOG="$PGDATA/serverlog"
|
||||||
|
|
||||||
|
@ -40,7 +37,7 @@ set -e
|
||||||
test -x $DAEMON || exit 0
|
test -x $DAEMON || exit 0
|
||||||
|
|
||||||
echo -n "Starting PostgreSQL: "
|
echo -n "Starting PostgreSQL: "
|
||||||
$DAEMON -D $PGDATA -p $PGPORT
|
$DAEMON -D $PGDATA
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue