🗃️ Committing everything that changed 🗃️
Some checks failed
release-tag / release-image (push) Failing after 12m9s

rootfs/usr/local/etc/docker/functions/entrypoint.sh
rootfs/usr/local/etc/docker/init.d/00-tftpd.sh
rootfs/usr/local/etc/docker/init.d/zz-nginx.sh
This commit is contained in:
casjay
2025-09-20 06:40:02 -04:00
parent 82e2d7a347
commit d52a0d0c6f
3 changed files with 84 additions and 20 deletions

16
rootfs/usr/local/etc/docker/init.d/00-tftpd.sh Executable file → Normal file
View File

@@ -31,6 +31,18 @@
printf '%s\n' "# - - - Initializing tftpd - - - #"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SERVICE_NAME="tftpd"
# Function to exit appropriately based on context
__script_exit() {
local exit_code="${1:-0}"
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
# Script is being sourced - use return
return "$exit_code"
else
# Script is being executed - use exit
exit "$exit_code"
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SCRIPT_NAME="$(basename "$0" 2>/dev/null)"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
@@ -326,7 +338,7 @@ __run_start_script() {
__post_execute 2>"/dev/stderr" | tee -p -a "$LOG_DIR/init.txt" >/dev/null
retVal=$?
echo "Initializing $SCRIPT_NAME has completed"
exit $retVal
__script_exit $retVal
else
# ensure the command exists
if [ ! -x "$cmd" ]; then
@@ -533,4 +545,4 @@ if [ "$?" -ne 0 ] && [ -n "$EXEC_CMD_BIN" ]; then
SERVICE_IS_RUNNING="false"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exit $SERVICE_EXIT_CODE
__script_exit $SERVICE_EXIT_CODE

View File

@@ -32,6 +32,18 @@ printf '%s
' "# - - - Initializing nginx - - - #"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SERVICE_NAME="nginx"
# Function to exit appropriately based on context
__script_exit() {
local exit_code="${1:-0}"
if [ "${BASH_SOURCE[0]}" != "${0}" ]; then
# Script is being sourced - use return
return "$exit_code"
else
# Script is being executed - use exit
exit "$exit_code"
fi
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SCRIPT_NAME="$(basename "$0" 2>/dev/null)"
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
export PATH="/usr/local/etc/docker/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin"
@@ -415,7 +427,7 @@ __run_start_script() {
__post_execute 2>"/dev/stderr" | tee -p -a "$LOG_DIR/init.txt" >/dev/null
retVal=$?
echo "Initializing $SCRIPT_NAME has completed"
exit $retVal
__script_exit $retVal
else
# ensure the command exists
if [ ! -x "$cmd" ]; then
@@ -639,4 +651,4 @@ if [ "$?" -ne 0 ] && [ -n "$EXEC_CMD_BIN" ]; then
SERVICE_IS_RUNNING="false"
fi
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
exit $SERVICE_EXIT_CODE
__script_exit $SERVICE_EXIT_CODE