Skip to content

Commit 0db9294

Browse files
authored
GUACAMOLE-2076: Merge link contents of GUACAMOLE_HOME subdirectories only if they exist.
2 parents ffbee1a + e875344 commit 0db9294

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

guacamole-docker/entrypoint.d/100-generate-guacamole-home.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,16 @@ EOF
7474
if [ -e "$GUACAMOLE_HOME_TEMPLATE" ]; then
7575

7676
# Create links for any libraries provided in the template GUACAMOLE_HOME
77-
find "$GUACAMOLE_HOME_TEMPLATE/lib" -mindepth 1 -maxdepth 1 \
78-
-exec ln -sv "{}" "$GUACAMOLE_HOME/lib/" ";"
77+
if [ -e "$GUACAMOLE_HOME_TEMPLATE/lib" ]; then
78+
find "$GUACAMOLE_HOME_TEMPLATE/lib" -mindepth 1 -maxdepth 1 \
79+
-exec ln -sv "{}" "$GUACAMOLE_HOME/lib/" ";"
80+
fi
7981

8082
# Create links for any extensions provided in the template GUACAMOLE_HOME
81-
find "$GUACAMOLE_HOME_TEMPLATE/extensions" -mindepth 1 -maxdepth 1 \
82-
-exec ln -sv "{}" "$GUACAMOLE_HOME/extensions/" ";"
83+
if [ -e "$GUACAMOLE_HOME_TEMPLATE/extensions" ]; then
84+
find "$GUACAMOLE_HOME_TEMPLATE/extensions" -mindepth 1 -maxdepth 1 \
85+
-exec ln -sv "{}" "$GUACAMOLE_HOME/extensions/" ";"
86+
fi
8387

8488
# Create links for all other files directly within the template
8589
# GUACAMOLE_HOME

0 commit comments

Comments
 (0)