summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaquette, Francis <francis.paquette@amdocs.com>2018-01-31 08:33:50 -0500
committerPaquette, Francis <francis.paquette@amdocs.com>2018-01-31 08:38:03 -0500
commit10f3bd738258130fa1558dd8ae8ba2a1342993ab (patch)
treee56dddbffd1df71fb7ac238363804f43f8d8bc6e
parent9a5553c1f23da07abea1b5a911fbfa6955d38f36 (diff)
Fixed a curruption that occurs on startup
The start script was adding the 2 extra lines right after the last character in the file. The extra line in the file will ensure that it will be added at the end. Also, the start script now ensures that only 1 copy of these added attributes exist in the file. Issue-ID: AAI-717 Change-Id: I5deb2d9e74d48f3c4d2351582f05468590d0b72e Signed-off-by: Paquette, Francis <francis.paquette@amdocs.com>
-rw-r--r--bundleconfig-local/etc/sysprops/sys-props.properties3
-rw-r--r--src/main/scripts/start.sh8
2 files changed, 7 insertions, 4 deletions
diff --git a/bundleconfig-local/etc/sysprops/sys-props.properties b/bundleconfig-local/etc/sysprops/sys-props.properties
index 3ffc445..4aed03f 100644
--- a/bundleconfig-local/etc/sysprops/sys-props.properties
+++ b/bundleconfig-local/etc/sysprops/sys-props.properties
@@ -115,4 +115,5 @@ RESTLET_COMPONENT_REUSE_ADDRESS=true
#Service System Properties. Please, place any Service related System Properties below.
KEY_STORE_PASSWORD=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
-KEY_MANAGER_PASSWORD=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o \ No newline at end of file
+KEY_MANAGER_PASSWORD=OBF:1i9a1u2a1unz1lr61wn51wn11lss1unz1u301i6o
+
diff --git a/src/main/scripts/start.sh b/src/main/scripts/start.sh
index fc063ad..87043d9 100644
--- a/src/main/scripts/start.sh
+++ b/src/main/scripts/start.sh
@@ -13,14 +13,16 @@ if [ -z "$KEY_STORE_PASSWORD" ]; then
echo "KEY_STORE_PASSWORD must be set in order to start up process"
exit 1
else
- echo "KEY_STORE_PASSWORD=$KEY_STORE_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
+ sed -i /"KEY_STORE_PASSWORD"/d $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
+ echo "KEY_STORE_PASSWORD=$KEY_STORE_PASSWORD" >> $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 "KEY_MANAGER_PASSWORD=$KEY_MANAGER_PASSWORD\n" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
+ sed -i /"KEY_MANAGER_PASSWORD"/d $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
+ echo "KEY_MANAGER_PASSWORD=$KEY_MANAGER_PASSWORD" >> $AJSC_CONF_HOME/etc/sysprops/sys-props.properties
fi
if [ -z "$UI_HTTPS_PORT" ] && [ -z "$UI_HTTP_PORT" ]; then
@@ -94,4 +96,4 @@ if [ "$UI_HTTPS_PORT" ]; then
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xms1024m -Xmx4096m $PROPS -classpath $CLASSPATH com.att.ajsc.runner.Runner context=/ sslport=$UI_HTTPS_PORT
elif [ "$UI_HTTP_PORT" ]; then
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xms1024m -Xmx4096m $PROPS -classpath $CLASSPATH com.att.ajsc.runner.Runner context=/ port=$UI_HTTP_PORT
-fi \ No newline at end of file
+fi