aboutsummaryrefslogtreecommitdiffstats
path: root/aai-resources/src/main/docker
diff options
context:
space:
mode:
Diffstat (limited to 'aai-resources/src/main/docker')
-rw-r--r--aai-resources/src/main/docker/docker-entrypoint.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/aai-resources/src/main/docker/docker-entrypoint.sh b/aai-resources/src/main/docker/docker-entrypoint.sh
index 2f57a2a..d268888 100644
--- a/aai-resources/src/main/docker/docker-entrypoint.sh
+++ b/aai-resources/src/main/docker/docker-entrypoint.sh
@@ -31,12 +31,8 @@ export SERVER_PORT=${SERVER_PORT:-8447};
USER_ID=${LOCAL_USER_ID:-9001}
GROUP_ID=${LOCAL_GROUP_ID:-9001}
-ln -s bin scripts
-ln -s /opt/aai/logroot/AAI-RES logs
+if [ $(cat /etc/passwd | grep aaiadmin | wc -l) -eq 0 ]; then
-echo "Project Build Version: ${aai.build.version}";
-
-if [ $(cat /etc/passwd | grep aaiadmin | wc -l) -eq 0 ]; then
groupadd aaiadmin -g ${GROUP_ID} || {
echo "Unable to create the group id for ${GROUP_ID}";
exit 1;
@@ -51,6 +47,10 @@ chown -R aaiadmin:aaiadmin /opt/app /opt/aai/logroot /var/chef
find /opt/app/ -name "*.sh" -exec chmod +x {} +
if [ -f ${APP_HOME}/aai.sh ]; then
+
+ gosu aaiadmin ln -s bin scripts
+ gosu aaiadmin ln -s /opt/aai/logroot/AAI-RES logs
+
mv ${APP_HOME}/aai.sh /etc/profile.d/aai.sh
chmod 755 /etc/profile.d/aai.sh
@@ -105,6 +105,6 @@ JAVA_OPTS="${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom";
JAVA_OPTS="${JAVA_OPTS} -Dloader.path=$APP_HOME/resources";
JAVA_OPTS="${JAVA_OPTS} ${POST_JAVA_OPTS}";
-JAVA_MAIN_JAR=$(ls lib/aai-resources-*SNAPSHOT.jar);
+JAVA_MAIN_JAR=$(ls lib/aai-resources*.jar);
${JAVA_CMD} ${JVM_OPTS} ${JAVA_OPTS} -jar ${JAVA_MAIN_JAR};