🗃️ Update codebase 🗃️
Build and Push / build (push) Failing after 2s

rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
2026-07-27 13:32:56 -04:00
parent 245290ac94
commit 4643b7cb0f
2 changed files with 18 additions and 10 deletions
+4 -2
View File
@@ -422,8 +422,10 @@ if [ "$ENTRYPOINT_FIRST_RUN" != "no" ] || [ "$CONFIG_DIR_INITIALIZED" = "no" ] |
echo "Initialized on: $INIT_DATE" >"$ENTRYPOINT_INIT_FILE" 2>/dev/null || true
fi
# - - - - - - - - - - - - - - - - - - - - - - - - -
# setup the smtp server
__setup_mta
# setup the smtp server — non-fatal; __symlink requires the target to
# pre-exist so __find_replace on a not-yet-created /etc/msmtprc returns 1,
# which kills the script under set -e if not guarded here
__setup_mta || true
# - - - - - - - - - - - - - - - - - - - - - - - - -
ENTRYPOINT_FIRST_RUN="no"
fi
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202607082330-git
##@Version : 202607271325-git
# @@Author : Jason Hempstead
# @@Contact : git-admin@casjaysdev.pro
# @@License : LICENSE.md
@@ -10,7 +10,7 @@
# @@Created : Sunday, Sep 03, 2023 01:40 EDT
# @@File : docker-entrypoint
# @@Description : functions for my docker containers
# @@Changelog : newScript
# @@Changelog : fix __setup_mta calling __symlink with from/to swapped, which no-op'd the symlink and broke msmtp/ssmtp/postfix config on container start
# @@TODO : Refactor code
# @@Other :
# @@Resource :
@@ -1171,12 +1171,14 @@ from ${account_user:-root}@${account_domain:-$HOSTNAME}
EOF
fi
if [ -f "/config/msmtp/msmtprc" ]; then
__symlink "/config/msmtp/msmtprc" "/etc/msmtprc"
# __symlink(from, to) requires the "to" (config) side to already exist
# and creates "from" (etc) as a symlink to it — arguments were reversed here
__symlink "/etc/msmtprc" "/config/msmtp/msmtprc"
__initialize_replace_variables "/etc/msmtprc"
chmod 600 "/etc/msmtprc" 2>/dev/null || true
# sendmail compat symlink
if [ ! -e "/usr/sbin/sendmail" ] && command -v msmtp &>/dev/null; then
__symlink "$(command -v msmtp)" "/usr/sbin/sendmail"
__symlink "/usr/sbin/sendmail" "$(command -v msmtp)"
fi
[ "$DEBUGGER" = "on" ] && echo "Done setting up msmtp"
fi
@@ -1204,17 +1206,19 @@ FromLineOverride=yes
EOF
fi
if [ -f "/config/ssmtp/ssmtp.conf" ]; then
# __symlink(from, to) requires the "to" (config) side to already exist
# and creates "from" (etc) as a symlink to it — arguments were reversed here
for file in $symlink_files; do
__symlink "/config/ssmtp/$file" "/etc/ssmtp/$file"
__symlink "/etc/ssmtp/$file" "/config/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"
__symlink "/etc/ssmtp/revaliases" "/config/ssmtp/revaliases"
__initialize_replace_variables "/etc/ssmtp/revaliases"
else
touch "/config/ssmtp/revaliases"
__symlink "/config/ssmtp/revaliases" "/etc/ssmtp/revaliases"
__symlink "/etc/ssmtp/revaliases" "/config/ssmtp/revaliases"
__initialize_replace_variables "/etc/ssmtp/revaliases"
fi
[ "$DEBUGGER" = "on" ] && echo "Done setting up ssmtp"
@@ -1255,8 +1259,10 @@ relayhost = [$relay_server]:$relay_port
EOF
fi
if [ -d "/config/postfix" ]; then
# __symlink(from, to) requires the "to" (config) side to already exist
# and creates "from" (etc) as a symlink to it — arguments were reversed here
for f in $symlink_files; do
__symlink "/config/postfix/$f" "/etc/postfix/$f"
__symlink "/etc/postfix/$f" "/config/postfix/$f"
done
__initialize_replace_variables "/etc/postfix"
touch "/config/postfix/aliases" "/config/postfix/mynetworks" "/config/postfix/transport"