summaryrefslogtreecommitdiff
path: root/apps/compiler/includes/functions.sh
diff options
context:
space:
mode:
authorYehonal <yehonal.azeroth@gmail.com>2022-11-04 13:53:07 +0100
committerGitHub <noreply@github.com>2022-11-04 13:53:07 +0100
commit2420d19e54eef2df6e9d997f0582d5d485920ecd (patch)
treeed432e765c9173f8ce17e299bc3a0f386a864b27 /apps/compiler/includes/functions.sh
parente64138314c6db1adf6c80b51ed060e681ad31e2d (diff)
fix(CORE): file permissions for the devcontainer (#13686)
Diffstat (limited to 'apps/compiler/includes/functions.sh')
-rw-r--r--apps/compiler/includes/functions.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/apps/compiler/includes/functions.sh b/apps/compiler/includes/functions.sh
index 044425a7e5..842f65b85b 100644
--- a/apps/compiler/includes/functions.sh
+++ b/apps/compiler/includes/functions.sh
@@ -136,16 +136,19 @@ function comp_compile() {
cd $CWD
- if [[ $DOCKER = 1 ]]; then
- echo "Generating confs..."
- cp -n "env/dist/etc/worldserver.conf.dockerdist" "${confDir}/worldserver.conf"
- cp -n "env/dist/etc/authserver.conf.dockerdist" "${confDir}/authserver.conf"
- cp -n "env/dist/etc/dbimport.conf.dockerdist" "${confDir}/dbimport.conf"
- fi
# set all aplications SUID bit
echo "Setting permissions on binary files"
- find "$AC_BINPATH_FULL" -type f -exec sudo chown root:root -- {} +
- find "$AC_BINPATH_FULL" -type f -exec sudo chmod u+s -- {} +
+ find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec sudo chown root:root -- {} +
+ find "$AC_BINPATH_FULL" -mindepth 1 -maxdepth 1 -type f -exec sudo chmod u+s -- {} +
+
+ DOCKER_ETC_FOLDER=${DOCKER_ETC_FOLDER:-"env/dist/etc"}
+
+ if [[ $DOCKER = 1 && $DISABLE_DOCKER_CONF != 1 ]]; then
+ echo "Generating confs..."
+ cp -n "$DOCKER_ETC_FOLDER/worldserver.conf.dockerdist" "${confDir}/worldserver.conf"
+ cp -n "$DOCKER_ETC_FOLDER/authserver.conf.dockerdist" "${confDir}/authserver.conf"
+ cp -n "$DOCKER_ETC_FOLDER/dbimport.conf.dockerdist" "${confDir}/dbimport.conf"
+ fi
echo "Done"
;;