-#!/bin/bash -x
+#!/usr/bin/env ash
#
# ============LICENSE_START=======================================================
# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
CONFIG_FILE=${CONFIG_FILE}
fi
-if [ -z "$CONFIG_FILE" ]
- then
+if [ -z "$CONFIG_FILE" ]; then
CONFIG_FILE="${POLICY_HOME}/etc/defaultConfig.json"
fi
-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/xacml.properties ]]; then
+if [ -f "${POLICY_HOME}/etc/mounted/xacml.properties" ]; then
echo "overriding xacml.properties in guards application"
cp -f "${POLICY_HOME}"/etc/mounted/xacml.properties "${POLICY_HOME}"/apps/guard/
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
-#!/bin/bash
+#!/usr/bin/env ash
#
# ============LICENSE_START=======================================================
-# Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
# Modifications Copyright (C) 2020 Bell Canada. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
sed 's/\\//g' "${POLICY_HOME}"/apps/guard/xacml.properties > /tmp/temp.xacml.properties
# Remove temp file
-if [ ! -f /tmp/temp.xacml.properties ]
- then
+if [ ! -f /tmp/temp.xacml.properties ]; then
echo "Temporary guard xacml properties file not found!"
exit 1
fi
# Remove temp file
rm /tmp/temp.xacml.properties
-if [ -z "$DB_HOSTNAME" ]
- then
+if [ -z "$DB_HOSTNAME" ]; then
echo "No Mariadb host provided in guard xacml.properties."
exit 2
fi
-if [ -z "$DB_USERNAME" ]
- then
+if [ -z "$DB_USERNAME" ]; then
echo "No Mariadb username provided in guard xacml.properties."
exit 2
fi
-if [ -z "$DB_PASSWORD" ]
- then
+if [ -z "$DB_PASSWORD" ]; then
echo "No Mariadb password provided in guard xacml.properties."
exit 2
fi