-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix db tracking plus errordir/sentdir enhancements (#157)
* Fix the field lookup in update mode to use lowercase always * Update sample config.xml to show new attrobutes and extended options for errordir and sentdir * Simple bash script to connect to H2 DB * Support controlling name of file stored in "sentdir" and "errordir" * Document stored_sentdir_filename and sotred_errordir_filename as well as provide more examples for setting errordir and sentdir using extended dynamic variables * Update release notes * Updated version number * Make config file settable using environment variable
- Loading branch information
1 parent
bb250db
commit ff5c8db
Showing
16 changed files
with
140 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
#!/bin/bash | ||
set -e | ||
# purpose: runs the remote OpenAS2 connect application | ||
x=`basename $0` | ||
|
||
function usage() { | ||
echo "Connect to a running instance of OpenAS2." | ||
echo "usage: ${x} [-u user ID] <-P password> [-h host] [-p port]" | ||
echo " WHERE" | ||
echo " user ID = the user ID configured for the DB Defaults to 'sa'" | ||
echo " password = the password configured for the DB" | ||
echo " Can be set as OPENAS2_DB_PWD environment variable" | ||
echo " host = hostname or IP address of OpenAS2 server. Defaults to \"localhost\" if not provided." | ||
echo " port = port that the OpenAS2 DB is running on. Defaults to 9092 if not provided." | ||
echo "" | ||
echo " eg. $0 -u MyuserId -p MySecret" | ||
echo " $0 -u MyuserId -p MySecret -h as2.mydomain.com" | ||
echo " $0 -u MyuserId -p MySecret -h as2.mydomain.com -c SSL_DH_anon_WITH_RC4_128_MD5" | ||
exit 1 | ||
} | ||
|
||
if test $# -lt 1; then | ||
usage | ||
fi | ||
|
||
OPENAS2_DB_UID=sa | ||
HOST_NAME=localhost | ||
HOST_PORT=9092 | ||
|
||
while getopts "u:p:h:P:" opt; do | ||
case ${opt} in | ||
u ) OPENAS2_DB_UID=$OPTARG | ||
;; | ||
P ) OPENAS2_DB_PWD=$OPTARG | ||
;; | ||
h ) HOST_NAME=$OPTARG | ||
;; | ||
p ) HOST_PORT=$OPTARG | ||
;; | ||
\? ) usage | ||
;; | ||
esac | ||
done | ||
|
||
binDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
# Backwards compatibility: use value from pid_file if pid_file has a value and openas2_pid has no value. | ||
# | ||
if [ -z $JAVA_HOME ]; then | ||
OS=$(uname -s) | ||
|
||
if [[ "${OS}" == *Darwin* ]]; then | ||
# Mac OS X platform | ||
JAVA_HOME=$(/usr/libexec/java_home) | ||
elif [[ "${OS}" == *Linux* ]]; then | ||
# Linux platform | ||
JAVA_HOME=$(dirname $(dirname $(readlink -f $(which java)))) | ||
elif [[ "${OS}" == *MINGW* ]]; then | ||
# Windows NT platform | ||
echo "Windows not supported by this script" | ||
fi | ||
fi | ||
|
||
if [ -z $JAVA_HOME ]; then | ||
echo "ERROR: Cannot find JAVA_HOME" | ||
exit 1 | ||
fi | ||
|
||
CMD=`echo "${JAVA_HOME}/bin/java -cp .:${binDir}/../lib/h2* org.h2.tools.Shell -user ${OPENAS2_DB_UID} -password ${OPENAS2_DB_PWD} -url jdbc:h2:tcp://${HOST_NAME}:${HOST_PORT}/openas2"` | ||
echo | ||
echo Running ${CMD} | ||
echo | ||
${CMD} | ||
RETVAL="$?" | ||
exit $RETVAL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters