From 15f5e553909799c1d25cf1d1fa9fde5b7561b482 Mon Sep 17 00:00:00 2001 From: casjay Date: Wed, 31 Jul 2024 12:27:02 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Fixed:=20rootfs/usr/loc?= =?UTF-8?q?al/etc/docker/functions/entrypoint.sh=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/usr/local/etc/docker/functions/entrypoint.sh --- .../usr/local/etc/docker/functions/entrypoint.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh index 37757d8..05c7f6d 100644 --- a/rootfs/usr/local/etc/docker/functions/entrypoint.sh +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -451,7 +451,7 @@ __create_service_user() { local exitStatus=0 local set_home_dir="" local create_user="${1:-$SERVICE_USER}" - local create_group="${2:-$SERVICE_GROUP}" + local create_group="${2:-${SERVICE_GROUP:-$create_user}}" local create_home_dir="${3:-${WORK_DIR:-/home/$create_user}}" local create_uid="${4:-${SERVICE_UID:-$USER_UID}}" local create_gid="${5:-${SERVICE_GID:-$USER_GID}}" @@ -620,6 +620,15 @@ EOF __symlink "/config/ssmtp/$file" "/etc/ssmtp/$file" __initialize_replace_variables "/etc/ssmtp/$file" done + if [ -f "/etc/ssmtp/revaliases" ] && [ ! -f "/config/ssmtp/revaliases" ]; then + mv -f "/etc/ssmtp/revaliases" "/config/ssmtp/revaliases" + __symlink "/config/ssmtp/revaliases" "/etc/ssmtp/revaliases" + __initialize_replace_variables "/etc/ssmtp/revaliases" + else + touch "/config/ssmtp/revaliases" + __symlink "/config/ssmtp/revaliases" "/etc/ssmtp/revaliases" + __initialize_replace_variables "/etc/ssmtp/revaliases" + fi echo "Done setting up ssmtp" fi @@ -720,6 +729,11 @@ __initialize_replace_variables() { __find_replace "REPLACE_APP_GROUP" "${SERVICE_GROUP:-${SERVICE_USER:-${RUNAS_USER:-root}}}" "$set_dir" __find_replace "REPLACE_WWW_GROUP" "${SERVICE_GROUP:-${SERVICE_USER:-${RUNAS_USER:-root}}}" "$set_dir" __find_replace "REPLACE_SERVICE_USER" "${SERVICE_USER:-${RUNAS_USER:-root}}" "$set_dir" + __find_replace "REPLACE_SERVICE_GROUP" "${SERVICE_GROUP:-${RUNAS_USER:-root}}" "$set_dir" + if [ -n "$VAR_DIR" ]; then + mkdir -p "$VAR_DIR" + __find_replace "REPLACE_VAR_DIR" "$VAR_DIR" "$set_dir" + fi [ -n "$SERVICE_PORT" ] && __find_replace "REPLACE_SERVER_PORT" "${SERVICE_PORT:-80}" "$set_dir" [ -n "$HOSTNAME" ] && __find_replace "REPLACE_SERVER_NAME" "${FULL_DOMAIN_NAME:-$HOSTNAME}" "$set_dir" [ -n "$CONTAINER_NAME" ] && __find_replace "REPLACE_SERVER_SOFTWARE" "${CONTAINER_NAME:-docker}" "$set_dir"