diff --git a/Dockerfile b/Dockerfile index adf84aa..c88c931 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,9 +40,9 @@ RUN apk add --no-cache libgcc libstdc++ gnutls gnutls-utils $RUN_DEPENDENCIES && addgroup -g 10000 -S inspircd && \ adduser -u 10000 -h /inspircd/ -D -S -G inspircd inspircd -COPY --chown=inspircd:inspircd conf/ /conf/ COPY --chown=inspircd:inspircd entrypoint.sh /entrypoint.sh COPY --from=builder --chown=inspircd:inspircd /inspircd/ /inspircd/ +COPY --chown=inspircd:inspircd conf/ /inspircd/conf/ USER inspircd diff --git a/conf/config.sh b/conf/config.sh index ccddf1e..9285af3 100755 --- a/conf/config.sh +++ b/conf/config.sh @@ -1,17 +1,6 @@ #!/bin/sh # shellcheck disable=SC2039 -######################################## -### ### -### DON'T EDIT THIS FILE AFTER BUILD ### -### ### -### USE ENVIRONMENT VARIABLES ### -### INSTEAD ### -### ### -######################################## - - - # Default variables cat < - + #-#-#-#-#-#-#-#-#-#-#-#- SERVER DESCRIPTION -#-#-#-#-#-#-#-#-#-#-#-#- # # @@ -542,11 +542,11 @@ - - - - - + + + + + diff --git a/conf/links.sh b/conf/links.sh index f3ded6a..0f591d9 100755 --- a/conf/links.sh +++ b/conf/links.sh @@ -1,15 +1,5 @@ #!/bin/sh -######################################## -### ### -### DON'T EDIT THIS FILE AFTER BUILD ### -### ### -### USE ENVIRONMENT VARIABLES ### -### INSTEAD ### -### ### -######################################## - - # generateLinkBlock generateLinkBlock() { if [ "$6" = "" ]; then diff --git a/conf/opers.sh b/conf/opers.sh index fbaef5c..dbb5b58 100755 --- a/conf/opers.sh +++ b/conf/opers.sh @@ -1,14 +1,4 @@ #!/bin/sh -######################################## -### ### -### DON'T EDIT THIS FILE AFTER BUILD ### -### ### -### USE ENVIRONMENT VARIABLES ### -### INSTEAD ### -### ### -######################################## - - # Prevent breaking changes if [ "$INSP_OPER_PASSWORD_HASH" = "" ] && [ "$INSP_OPER_PASSWORD" != "" ]; then diff --git a/conf/services.sh b/conf/services.sh index e920e40..1581db0 100755 --- a/conf/services.sh +++ b/conf/services.sh @@ -1,15 +1,5 @@ #!/bin/sh -######################################## -### ### -### DON'T EDIT THIS FILE AFTER BUILD ### -### ### -### USE ENVIRONMENT VARIABLES ### -### INSTEAD ### -### ### -######################################## - - # When not specified, try to be smart and predict a allowmask if [ "$INSP_SERVICES_ALLOWMASK" = "" ]; then INSP_SERVICES_ALLOWMASK=$(ip route show dev eth0 | grep -v default | cut -d" " -f1 | head -1) diff --git a/entrypoint.sh b/entrypoint.sh index d1ccdc3..0203270 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,22 +3,6 @@ INSPIRCD_ROOT="/inspircd" -# TODO fix/make configuration better -# Make sure that the volume contains a default config but don't override an existing one -if [ ! -e $INSPIRCD_ROOT/conf/inspircd.conf ] && [ -w $INSPIRCD_ROOT/conf/ ]; then - cp -r /conf/* $INSPIRCD_ROOT/conf/ -elif [ ! -w $INSPIRCD_ROOT/conf/ ]; then - echo " - ################################## - ### ### - ### Can't write to volume! ### - ### Please change owner ### - ### to uid 10000 ### - ### ### - ################################## - " -fi - # Link certificates from secrets # See https://docs.docker.com/engine/swarm/secrets/ if [ -e /run/secrets/inspircd.key ] && [ -e /run/secrets/inspircd.crt ]; then