🗃️ Update codebase 🗃️
Some checks are pending
almalinux-10-dev / almalinux-10-dev (push) Waiting to run
almalinux-10 / almalinux-10 (push) Waiting to run
almalinux-8-dev / almalinux-8-dev (push) Waiting to run
almalinux-8 / almalinux-8 (push) Waiting to run
almalinux-9-dev / almalinux-9-dev (push) Waiting to run
almalinux-9 / almalinux-9 (push) Waiting to run
almalinux / release-almalinux (push) Waiting to run

rootfs/usr/local/bin/entrypoint.sh
rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
casjay
2025-11-30 18:27:25 -05:00
parent b45152270c
commit cce1fe8739
2 changed files with 86 additions and 35 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202511301200-git
##@Version : 202511301726-git
# @@Author : GEN_SCRIPT_REPLACE_AUTHOR
# @@Contact : GEN_SCRIPT_REPLACE_EMAIL
# @@License : GEN_SCRIPT_REPLACE_LICENSE
@@ -21,7 +21,25 @@
# shellcheck disable=SC1001,SC1003,SC2001,SC2003,SC2016,SC2031,SC2090,SC2115,SC2120,SC2155,SC2199,SC2229,SC2317,SC2329
# - - - - - - - - - - - - - - - - - - - - - - - - -
# run trap command on exit
trap 'retVal=$?;[ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ] && rm -Rf "$SERVICE_PID_FILE";exit $retVal' INT TERM PWR
trap '__trap_exit_handler' EXIT
trap '__trap_signal_handler' INT TERM PWR
# - - - - - - - - - - - - - - - - - - - - - - - - -
__trap_exit_handler() {
local retVal=$?
if [ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ]; then
rm -Rf "$SERVICE_PID_FILE" 2>/dev/null || true
fi
exit $retVal
}
# - - - - - - - - - - - - - - - - - - - - - - - - -
__trap_signal_handler() {
local retVal=$?
echo "Container received shutdown signal"
if [ "$SERVICE_IS_RUNNING" != "yes" ] && [ -f "$SERVICE_PID_FILE" ]; then
rm -Rf "$SERVICE_PID_FILE" 2>/dev/null || true
fi
exit $retVal
}
# - - - - - - - - - - - - - - - - - - - - - - - - -
# setup debugging - https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html
if [ -f "/config/.debug" ] && [ -z "$DEBUGGER_OPTIONS" ]; then