summaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorTaka Cho <takamune.cho@att.com>2020-11-30 14:06:16 -0500
committerTaka Cho <takamune.cho@att.com>2020-11-30 14:31:00 -0500
commitb47abded948f3382139b77da3051112ab40f907e (patch)
treef663d7094399e099209fc86b6e018485793358a1 /packages
parent29f78a7a67c64973371fab4d3374f965b2aa47d2 (diff)
move all bash to ash shell scripts - api
bash scripts convert to ash Issue-ID: POLICY-2847 Change-Id: I1121f77d0bfb35152ba5474f5a592a57a1362822 Signed-off-by: Taka Cho <takamune.cho@att.com>
Diffstat (limited to 'packages')
-rw-r--r--packages/policy-api-docker/src/main/docker/Dockerfile2
-rw-r--r--packages/policy-api-docker/src/main/docker/policy-api.sh11
2 files changed, 6 insertions, 7 deletions
diff --git a/packages/policy-api-docker/src/main/docker/Dockerfile b/packages/policy-api-docker/src/main/docker/Dockerfile
index 03fe1f6a..86e77b11 100644
--- a/packages/policy-api-docker/src/main/docker/Dockerfile
+++ b/packages/policy-api-docker/src/main/docker/Dockerfile
@@ -41,4 +41,4 @@ RUN chown -R policy:policy * && chmod 755 bin/*.sh
USER policy
WORKDIR $POLICY_HOME/bin
-ENTRYPOINT [ "bash", "./policy-api.sh" ]
+ENTRYPOINT [ "./policy-api.sh" ]
diff --git a/packages/policy-api-docker/src/main/docker/policy-api.sh b/packages/policy-api-docker/src/main/docker/policy-api.sh
index c5eee15d..b75b2a02 100644
--- a/packages/policy-api-docker/src/main/docker/policy-api.sh
+++ b/packages/policy-api-docker/src/main/docker/policy-api.sh
@@ -1,4 +1,4 @@
-#!/bin/bash -x
+#!/usr/bin/env ash
#
# ============LICENSE_START=======================================================
# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
@@ -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 api 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