aboutsummaryrefslogtreecommitdiffstats
path: root/packages/docker/src/main/docker/docker-install.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packages/docker/src/main/docker/docker-install.sh')
-rw-r--r--packages/docker/src/main/docker/docker-install.sh40
1 files changed, 23 insertions, 17 deletions
diff --git a/packages/docker/src/main/docker/docker-install.sh b/packages/docker/src/main/docker/docker-install.sh
index e65329da..5ec25823 100644
--- a/packages/docker/src/main/docker/docker-install.sh
+++ b/packages/docker/src/main/docker/docker-install.sh
@@ -4,7 +4,7 @@
# ============LICENSE_START=======================================================
# Installation Package
# ================================================================================
-# Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+# Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -369,26 +369,32 @@ function install_base() {
fi
done
+ /bin/mkdir -p "${POLICY_HOME}/logs/" > /dev/null 2>&1
+
if [[ ! ( -d "$POLICY_HOME" && -w "$POLICY_HOME" ) ]]; then
echo "ERROR: Installation directory $POLICY_HOME does not exist or not writable"
exit 1
fi
- if ! /bin/rm -fr "${POLICY_HOME}"/* > /dev/null 2>&1; then
- echo "error: aborting base installation: cannot delete the underlying ${POLICY_HOME} files"
- exit 1
- fi
+ if [[ -z ${POLICY_DOCKER} ]]; then
+ if ! /bin/rm -fr "${POLICY_HOME}"/* > /dev/null 2>&1; then
+ echo "error: aborting base installation: cannot delete the underlying ${POLICY_HOME} files"
+ exit 1
+ fi
- POLICY_HOME_CONTENTS=$(ls -A "${POLICY_HOME}" 2> /dev/null)
- if [[ -n ${POLICY_HOME_CONTENTS} ]]; then
- echo "error: aborting base installation: ${POLICY_HOME} directory is not empty"
- exit 1
- fi
+ POLICY_HOME_CONTENTS=$(ls -A "${POLICY_HOME}" 2> /dev/null)
+ if [[ -n ${POLICY_HOME_CONTENTS} ]]; then
+ echo "error: aborting base installation: ${POLICY_HOME} directory is not empty"
+ exit 1
+ fi
- if ! /bin/mkdir -p "${POLICY_HOME}/logs/" > /dev/null 2>&1; then
- echo "error: aborting base installation: cannot create ${POLICY_HOME}/logs/"
- exit 1
- fi
+ if [[ -n ${POLICY_LOGS} ]]; then
+ if ! /bin/mkdir -p "${POLICY_LOGS}" > /dev/null 2>&1; then
+ echo "error: aborting base installation: cannot create ${POLICY_LOGS}"
+ exit 1
+ fi
+ fi
+ fi
BASE_TGZ=$(ls base-*.tar.gz)
if [ ! -r ${BASE_TGZ} ]; then
@@ -861,7 +867,7 @@ function do_install()
set -x
fi
- echo "Starting installation at $(date)"
+ echo "Starting installation at $(date) at ${PWD}"
echo
COMPONENT_TYPE=base
@@ -876,12 +882,12 @@ function do_install()
installArtifacts
- if [[ -f apps-installer ]]; then
+ if [[ -f apps-controlloop-installer ]]; then
# if exists, any customizations to the
# base drools installation from the drools apps
# is executed here
- ./apps-installer
+ ./apps-controlloop-installer
fi
echo