aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/docker/docker-entrypoint.sh
diff options
context:
space:
mode:
authorFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-08-10 11:37:58 +0200
committerFiete Ostkamp <Fiete.Ostkamp@telekom.de>2024-08-10 11:37:58 +0200
commit672eeaa0f6cc0389b0a9398f3de319d40d783c2c (patch)
treed954504fcadc52f4aa9e67fb1faee912144fcdc3 /src/main/docker/docker-entrypoint.sh
parent0dcaef48dbae542f9b0212acbe957718643f5e34 (diff)
Make graphadmin compatible with a read-only filesystem
- move file modifying operations from the docker-entrypoint (runtime) to the Dockerfile (build time) Issue-ID: AAI-3955 Change-Id: If7950c4a7074b5bd68b26f3294aa664ef8dd276c Signed-off-by: Fiete Ostkamp <Fiete.Ostkamp@telekom.de>
Diffstat (limited to 'src/main/docker/docker-entrypoint.sh')
-rw-r--r--src/main/docker/docker-entrypoint.sh33
1 files changed, 11 insertions, 22 deletions
diff --git a/src/main/docker/docker-entrypoint.sh b/src/main/docker/docker-entrypoint.sh
index 78bb479..9232398 100644
--- a/src/main/docker/docker-entrypoint.sh
+++ b/src/main/docker/docker-entrypoint.sh
@@ -23,33 +23,22 @@ RESOURCES_HOME=${APP_HOME}/resources/;
export SERVER_PORT=${SERVER_PORT:-8449};
-find /opt/app/ -name "*.sh" -exec chmod +x {} +
+scriptName=$1;
-if [ -f ${APP_HOME}/aai.sh ]; then
- ln -s bin scripts
- ln -s /opt/aai/logroot/AAI-GA logs
+if [ ! -z $scriptName ]; then
- mv ${APP_HOME}/aai.sh /etc/profile.d/aai.sh
- chmod 755 /etc/profile.d/aai.sh
-
- scriptName=$1;
-
- if [ ! -z $scriptName ]; then
-
- if [ -f ${APP_HOME}/bin/${scriptName} ]; then
- shift 1;
- ${APP_HOME}/bin/${scriptName} "$@" || {
- echo "Failed to run the ${scriptName}";
- exit 1;
- }
- else
- echo "Unable to find the script ${scriptName} in ${APP_HOME}/bin";
+ if [ -f ${APP_HOME}/bin/${scriptName} ]; then
+ shift 1;
+ ${APP_HOME}/bin/${scriptName} "$@" || {
+ echo "Failed to run the ${scriptName}";
exit 1;
- fi;
-
- exit 0;
+ }
+ else
+ echo "Unable to find the script ${scriptName} in ${APP_HOME}/bin";
+ exit 1;
fi;
+ exit 0;
fi;
if [ -f ${APP_HOME}/resources/aai-graphadmin-swm-vars.sh ]; then