🗃️ Update codebase 🗃️

Dockerfile
rootfs/usr/local/bin/entrypoint.sh
This commit is contained in:
casjay
2025-11-29 09:04:35 -05:00
parent f580aeac65
commit 6380077e3a
2 changed files with 15 additions and 24 deletions

View File

@@ -371,11 +371,6 @@ else
rm -f /run/__start_init_scripts.pid /run/init.d/*.pid /run/*.pid 2>/dev/null || true
fi
# - - - - - - - - - - - - - - - - - - - - - - - - -
if [ ! -f "/run/__start_init_scripts.pid" ]; then
START_SERVICES="yes"
touch /run/__start_init_scripts.pid
fi
# - - - - - - - - - - - - - - - - - - - - - - - - -
[ "$ENTRYPOINT_MESSAGE" = "yes" ] && __printf_space "40" "The containers ip address is:" "$CONTAINER_IP4_ADDRESS"
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Show configured listing processes
@@ -401,26 +396,23 @@ __run_message
# Just start services
START_SERVICES="${START_SERVICES:-SYSTEM_INIT}"
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Never start services for these options
[ "$1" = "cron" ] && START_SERVICES="no"
[ "$1" = "tail" ] && START_SERVICES="no"
[ "$1" = "logs" ] && START_SERVICES="no"
[ "$1" = "cron" ] && START_SERVICES="no"
[ "$1" = "backup" ] && START_SERVICES="no"
[ "$1" = "healthcheck" ] && START_SERVICES="no"
[ "$1" = "init" ] && START_SERVICES="no" && CONTAINER_INIT="yes"
[ "$2" = "init" ] && START_SERVICES="no" && CONTAINER_INIT="yes"
echo "$1" | grep -qE '^(sh|bash)$|/*/(sh|bash)$' && START_SERVICES="no"
# Determine if we should start services based on command
# Only skip service start for the 'init' command
SKIP_SERVICE_START="no"
[ "$1" = "init" ] && SKIP_SERVICE_START="yes" && CONTAINER_INIT="yes"
[ "$2" = "init" ] && SKIP_SERVICE_START="yes" && CONTAINER_INIT="yes"
# - - - - - - - - - - - - - - - - - - - - - - - - -
# Start all services if no pidfile
# Start all services if no pidfile and not skipping
if [ "$START_SERVICES" = "yes" ] || [ -z "$1" ]; then
[ "$1" = "start" ] && shift 1
[ "$1" = "all" ] && shift 1
rm -Rf "/run"/*/*pid 2>/dev/null || true
echo "$$" >"$ENTRYPOINT_PID_FILE"
__start_init_scripts "/usr/local/etc/docker/init.d"
if [ "$SKIP_SERVICE_START" = "no" ]; then
[ "$1" = "start" ] && shift 1
[ "$1" = "all" ] && shift 1
rm -Rf "/run"/*/*pid 2>/dev/null || true
echo "$$" >"$ENTRYPOINT_PID_FILE"
__start_init_scripts "/usr/local/etc/docker/init.d"
CONTAINER_INIT="${CONTAINER_INIT:-no}"
fi
START_SERVICES="no"
CONTAINER_INIT="${CONTAINER_INIT:-no}"
fi
export START_SERVICES CONTAINER_INIT ENTRYPOINT_PID_FILE
# - - - - - - - - - - - - - - - - - - - - - - - - -