Page MenuHomec4science

common.rc
No OneTemporary

File Metadata

Created
Sat, Nov 9, 08:08

common.rc

#!/bin/bash
#
#The version of Shrine to install
export SHRINE_VERSION=1.19.1
IS_SNAPSHOT=`expr ${SHRINE_VERSION} : ".\+\?SNAPSHOT\$"`
if [ ${IS_SNAPSHOT} != 0 ] ; then
echo "WARNING: deploying snapshots is not supported"
exit
fi
export SHRINE_SVN_URL_BASE="https://open.med.harvard.edu/svn/shrine/releases/${SHRINE_VERSION}/"
export SHRINE_ONT_SVN_URL_BASE="https://open.med.harvard.edu/svn/shrine-ontology/"
export SHRINE_SVN_TRUNK_URL_BASE="https://open.med.harvard.edu/svn/shrine/trunk/"
#The i2b2 domain used for hive communication. See the i2b2 documentation for information about i2b2 domains.
export I2B2_DOMAIN_ID=i2b2demo
#The externally-facing IP address of this machine (not 127.0.0.1)
ETH0_IP=`ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`
#
# By default, use eth0's externally-facing ip address
# REQUIRED
## This installer requires you have an I2B2 installation.
export SHRINE_IP=$ETH0_IP
#Default IP address to use for i2b2-related addresses (should be the same in most setups)
export I2B2_IP_DEFAULT=$ETH0_IP
#The IP address of the machine hosting the i2b2 PM cell
export I2B2_PM_IP=$I2B2_IP_DEFAULT
#The IP address of the machine hosting the i2b2 Ontology cell
export I2B2_ONT_IP=$I2B2_IP_DEFAULT
#The IP address of the machine hosting the i2b2 CRC cell
export I2B2_CRC_IP=$I2B2_IP_DEFAULT
#The port Shrine listens on
export SHRINE_PORT=6060
#The SSL port requests to Shrine are redirected to
export SHRINE_SSL_PORT=6443
#
#Utility functions follow
function require()
{
if [ -z "$1" ] ; then
echo "Requirement not met: $2"
exit -1
fi
}
function escape()
{
ESCAPED=$(echo "$1" | sed "s| |\\\ |g" | sed "s|\:|\\\:|g" | sed "s|\.|\\\.|g" | sed "s|\/|\\\/|g")
}
function interpolate_file()
{
file=$1
pattern=$2
escape $3
replacement="$ESCAPED"
sed s/$pattern/$replacement/g $file
}
function interpolate()
{
pattern=$1
escape $2
replacement="$ESCAPED"
sed s/$pattern/$replacement/g
}
require ${SHRINE_VERSION} "SHRINE_VERSION must be set, and not be a snapshot"
require ${SHRINE_SVN_URL_BASE} "SHRINE_SVN_URL_BASE must be set"
require ${I2B2_DOMAIN_ID} "I2B2_DOMAIN_ID must be set"
require ${ETH0_IP} "ETH0_IP must be set"
require ${SHRINE_IP} " must be set"
require ${SHRINE_PORT} " must be set"
require ${SHRINE_SSL_PORT} " must be set"
require ${I2B2_PM_IP} " must be set"
require ${I2B2_ONT_IP} " must be set"
require ${I2B2_CRC_IP} " must be set"

Event Timeline