summaryrefslogtreecommitdiffstats
path: root/packages/base/src/files/install/elk/bin
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2018-05-21 15:02:40 -0400
committerJim Hahn <jrh3@att.com>2018-05-23 14:57:16 -0400
commitee033842018375e0200a9b8f2e0dc813974440fd (patch)
tree9e6ebcb9dd132cb8f4ef3e6dac216ec467516f6f /packages/base/src/files/install/elk/bin
parent1da6b3b6a28f40322a13e6fb5142206f1eefa027 (diff)
Replace LOGPATH with LOGSUFFIX
docker-install.sh does not expand ${{xxx}} values in .conf files before using them to update target files. Consequently, replaced LOGPATH with LOGSUFFIX in .conf files and updated target files to use ${{POLICY_LOGS}}${{LOGSUFFIX}} instead. Replace "${POLICY_HOME}/logs" in auxiliary files (e.g., logrotate) with "${POLICY_LOGS}/policy". Update license dates. In .sh files, changed ${{POLICY_LOGS}} to ${POLICY_LOGS}, and ensured that env.sh is sourced. Use hard-coded paths in conf files instead of replacing LOGPATH with LOGSUFFIX. Update license dates. Repoint path for IntegrityMonitor.log, as we cannot easily move since it's in common. Replace hard-coded log path in docker-install.sh. Undo hard-coded log paths where possible, and modify scripts to pass $POLICY_LOGS to JVM. Change-Id: I027d8d2173ae97fef73b0daff1d6a87452857f93 Issue-ID: POLICY-759 Signed-off-by: Jim Hahn <jrh3@att.com>
Diffstat (limited to 'packages/base/src/files/install/elk/bin')
-rw-r--r--packages/base/src/files/install/elk/bin/elk.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/packages/base/src/files/install/elk/bin/elk.sh b/packages/base/src/files/install/elk/bin/elk.sh
index 2f61547c9..86cfb46b3 100644
--- a/packages/base/src/files/install/elk/bin/elk.sh
+++ b/packages/base/src/files/install/elk/bin/elk.sh
@@ -29,7 +29,7 @@ function usage() {
}
function log() {
- echo "$(date +"%Y-%m-%d_%H-%M-%S") $1" >> ${POLICY_HOME}/logs/elk.log
+ echo "$(date +"%Y-%m-%d_%H-%M-%S") $1" >> ${POLICY_LOGS}/policy/elk.log
echo "$1"
}
@@ -128,7 +128,7 @@ function audit() {
fi
fi
- $JAVA_HOME/bin/java -cp $POLICY_HOME/servers/pap/webapps/pap/WEB-INF/lib/ONAP-PAP-REST-*.jar:$POLICY_HOME/servers/pap/webapps/pap/WEB-INF/lib/*: -DPROPERTY_FILE=$POLICY_HOME/servers/pap/bin/policyelk.properties org.onap.policy.pap.xacml.rest.elk.client.ElasticSearchPolicyUpdate
+ $JAVA_HOME/bin/java -cp $POLICY_HOME/servers/pap/webapps/pap/WEB-INF/lib/ONAP-PAP-REST-*.jar:$POLICY_HOME/servers/pap/webapps/pap/WEB-INF/lib/*: -DPOLICY_LOGS=$POLICY_LOGS -DPROPERTY_FILE=$POLICY_HOME/servers/pap/bin/policyelk.properties org.onap.policy.pap.xacml.rest.elk.client.ElasticSearchPolicyUpdate
}
#########################################################################
@@ -175,6 +175,8 @@ if pidof -o %PPID -x $(basename $0) > /dev/null 2>&1; then
exit 1
fi
+. ${POLICY_HOME}/etc/profile.d/env.sh
+
case $OPERATION in
audit)
audit
@@ -183,4 +185,4 @@ case $OPERATION in
usage
exit 1
;;
-esac \ No newline at end of file
+esac