summaryrefslogtreecommitdiffstats
path: root/src/main/scripts
diff options
context:
space:
mode:
authorARULNA <arul.nambi@amdocs.com>2017-06-12 16:41:12 -0400
committerARULNA <arul.nambi@amdocs.com>2017-06-12 16:41:28 -0400
commitb4922d319d293894fddd512d29b5f0d1411915d9 (patch)
tree36cec7575f1631aad41d7b1131d6352847ea0de2 /src/main/scripts
parent19dacd2ba38e345eeb5fcfbfe37d615602e8ea44 (diff)
Initial commit for AAI-UI(sparky-backend)
Change-Id: I785397ed4197663cdf0c1351041d2f708ed08763 Signed-off-by: ARULNA <arul.nambi@amdocs.com>
Diffstat (limited to 'src/main/scripts')
-rw-r--r--src/main/scripts/encNameValue.sh20
-rw-r--r--src/main/scripts/start.sh42
2 files changed, 62 insertions, 0 deletions
diff --git a/src/main/scripts/encNameValue.sh b/src/main/scripts/encNameValue.sh
new file mode 100644
index 0000000..daefd00
--- /dev/null
+++ b/src/main/scripts/encNameValue.sh
@@ -0,0 +1,20 @@
+# The script invokes the com.amdocs.aai.audit.security.encryption.EncryptedPropValue class to generate an encrypted value
+# e.g
+# ./encNameValue.sh odl.auth.password admin
+# will return:
+# odl.auth.password.x=f1e2c25183ef4b4ff655e7cd94d0c472
+#
+if [ "$#" -ne 2 ]; then
+ echo "Illegal number of parameters (expected 2)"
+ echo "Usage: `basename $0` <property name> <property value>" 1>&2
+ exit 1
+fi
+
+# On Windows we must use a different CLASSPATH separator character
+if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
+ CPSEP=\;
+else
+ CPSEP=:
+fi
+
+java -cp ".${CPSEP}../extJars/*" com.att.aai.util.EncryptedPropValue -n $1 -v $2
diff --git a/src/main/scripts/start.sh b/src/main/scripts/start.sh
new file mode 100644
index 0000000..3d1af06
--- /dev/null
+++ b/src/main/scripts/start.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+BASEDIR="/opt/app/sparky"
+AJSC_HOME="$BASEDIR"
+
+if [ -z "$CONFIG_HOME" ]; then
+ echo "CONFIG_HOME must be set in order to start up process"
+ exit 1
+fi
+
+if [ -z "$KEY_STORE_PASSWORD" ]; then
+ echo "KEY_STORE_PASSWORD must be set in order to start up process"
+ exit 1
+else
+ echo -e "KEY_STORE_PASSWORD=$KEY_STORE_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
+fi
+
+if [ -z "$KEY_MANAGER_PASSWORD" ]; then
+ echo "KEY_MANAGER_PASSWORD must be set in order to start up process"
+ exit 1
+else
+ echo -e "KEY_MANAGER_PASSWORD=$KEY_MANAGER_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
+fi
+
+CLASSPATH="$AJSC_HOME/lib/ajsc-runner-2.0.0.jar"
+CLASSPATH="$CLASSPATH:$AJSC_HOME/extJars/"
+CLASSPATH="$CLASSPATH:$CONFIG_HOME/portal/"
+PROPS="-DAJSC_HOME=$AJSC_HOME"
+PROPS="$PROPS -DAJSC_CONF_HOME=$BASEDIR/bundleconfig/"
+PROPS="$PROPS -Dlogback.configurationFile=$BASEDIR/bundleconfig/etc/logback.xml"
+PROPS="$PROPS -DAJSC_SHARED_CONFIG=$AJSC_CONF_HOME"
+PROPS="$PROPS -DAJSC_EXTERNAL_LIB_FOLDERS=$AJSC_HOME/commonLibs"
+PROPS="$PROPS -DAJSC_EXTERNAL_PROPERTIES_FOLDERS=$AJSC_HOME/ajsc-shared-config/etc"
+PROPS="$PROPS -DAJSC_SERVICE_NAMESPACE=ajsc-tier-support-ui"
+PROPS="$PROPS -DAJSC_SERVICE_VERSION=v1"
+PROPS="$PROPS -DSOACLOUD_SERVICE_VERSION=0.0.0"
+PROPS="$PROPS -Dserver.port=8000"
+PROPS="$PROPS -DCONFIG_HOME=$CONFIG_HOME"
+
+echo $CLASSPATH
+
+/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xms1024m -Xmx4096m $PROPS -classpath $CLASSPATH com.att.ajsc.runner.Runner context=/ port=9517