summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2020-11-30 13:50:21 -0500
committerTaka Cho <takamune.cho@att.com>2020-11-30 13:51:17 -0500
commit14a8a2f30a202d816b32b658969d0210e976320d (patch)
treea080dcdfe0f87d8e87e815e8aa7c4696a075794c
parentc65d484ec4618550675f76235003d5660202886f (diff)
move all bash to ash shell scripts - pap
bash scripts convert to ash Issue-ID: POLICY-2847 Change-Id: Icbe4afd9abe7d3634cce9cd7fb5b72dad38ecfcf Signed-off-by: Taka Cho <takamune.cho@att.com>
-rw-r--r--packages/policy-pap-docker/src/main/docker/Dockerfile2
-rw-r--r--packages/policy-pap-docker/src/main/docker/policy-pap.sh11
2 files changed, 6 insertions, 7 deletions
diff --git a/packages/policy-pap-docker/src/main/docker/Dockerfile b/packages/policy-pap-docker/src/main/docker/Dockerfile
index 24aae2fa..bbe3e761 100644
--- a/packages/policy-pap-docker/src/main/docker/Dockerfile
+++ b/packages/policy-pap-docker/src/main/docker/Dockerfile
@@ -42,4 +42,4 @@ RUN chown -R policy:policy * && chmod 755 bin/*.sh
USER policy
WORKDIR $POLICY_HOME/bin
-ENTRYPOINT [ "bash", "./policy-pap.sh" ]
+ENTRYPOINT [ "./policy-pap.sh" ]
diff --git a/packages/policy-pap-docker/src/main/docker/policy-pap.sh b/packages/policy-pap-docker/src/main/docker/policy-pap.sh
index cfcf6aaa..70dc7bde 100644
--- a/packages/policy-pap-docker/src/main/docker/policy-pap.sh
+++ b/packages/policy-pap-docker/src/main/docker/policy-pap.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/usr/bin/env ash
#
# ============LICENSE_START=======================================================
# Copyright (C) 2019-2020 Nordix Foundation.
@@ -32,24 +32,23 @@ else
CONFIG_FILE=${CONFIG_FILE}
fi
-if [ -z "$CONFIG_FILE" ]
- then
+if [ -z "$CONFIG_FILE" ]; then
CONFIG_FILE="${POLICY_HOME}/etc/defaultConfig.json"
fi
echo "Policy pap config file: $CONFIG_FILE"
-if [[ -f "${POLICY_HOME}"/etc/mounted/policy-truststore ]]; then
+if [ -f "${POLICY_HOME}/etc/mounted/policy-truststore" ]; then
echo "overriding policy-truststore"
cp -f "${POLICY_HOME}"/etc/mounted/policy-truststore "${TRUSTSTORE}"
fi
-if [[ -f "${POLICY_HOME}"/etc/mounted/policy-keystore ]]; then
+if [ -f "${POLICY_HOME}/etc/mounted/policy-keystore" ]; then
echo "overriding policy-keystore"
cp -f "${POLICY_HOME}"/etc/mounted/policy-keystore "${KEYSTORE}"
fi
-if [[ -f "${POLICY_HOME}"/etc/mounted/logback.xml ]]; then
+if [ -f "${POLICY_HOME}/etc/mounted/logback.xml" ]; then
echo "overriding logback.xml"
cp -f "${POLICY_HOME}"/etc/mounted/logback.xml "${POLICY_HOME}"/etc/
fi