Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Minor keycloak/docker-entrypoint.sh update to try and remove stale symlinks

Rich Turner3e3b4ac8a0b2
diff --git a/keycloak/docker-entrypoint.sh b/keycloak/docker-entrypoint.sh
index 8ee0a150a..52dd1be85 100644
--- a/keycloak/docker-entrypoint.sh
+++ b/keycloak/docker-entrypoint.sh
@@ -3,6 +3,15 @@
# Symlink each theme from deployment this preserves the default keycloak theme, reasons for this mechanism:
# Cannot volume map a subdir of a named volume
# Want all customisation to be in the /deployment dir and deployment-data volume
+
+# Remove any stale symlinks
+for dir in /opt/jboss/keycloak/themes/*; do
+ if [ -L ${dir} ]; then
+ rm ${dir}
+ fi
+done
+
+# Link standard themes
if [ -d "/deployment/keycloak/themes" ]; then
for dir in /deployment/keycloak/themes/*; do
if [ -d ${dir} ]; then
@@ -23,4 +32,4 @@ fi
exec /opt/jboss/tools/docker-entrypoint.sh $@
-exit $?
\ No newline at end of file
+exit $?