diff --git a/rootfs/usr/local/bin/entrypoint.sh b/rootfs/usr/local/bin/entrypoint.sh index 03e46a9..f3b9b5a 100755 --- a/rootfs/usr/local/bin/entrypoint.sh +++ b/rootfs/usr/local/bin/entrypoint.sh @@ -368,7 +368,7 @@ if [ -f "$ENTRYPOINT_PID_FILE" ]; then else START_SERVICES=yes # Clean any stale PID files on first run - rm -f /run/__start_init_scripts.pid /run/init.d/*.pid /run/*.pid 2>/dev/null || true + rm -f /run/.start_init_scripts.pid /run/init.d/*.pid /run/*.pid 2>/dev/null || true fi # - - - - - - - - - - - - - - - - - - - - - - - - - [ "$ENTRYPOINT_MESSAGE" = "yes" ] && __printf_space "40" "The containers ip address is:" "$CONTAINER_IP4_ADDRESS" diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh index d41e492..9b8c550 100644 --- a/rootfs/usr/local/etc/docker/functions/entrypoint.sh +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -235,11 +235,11 @@ __no_exit() { local failed_services="" local failure_count=0 - [ -f "/run/no_exit.pid" ] && return 0 + [ -f "/run/.no_exit.pid" ] && return 0 exec bash -c " - trap 'echo \"Container shutdown requested\"; rm -f /run/no_exit.pid /run/*.pid; exit 0' TERM INT - echo \$\$ > /run/no_exit.pid + trap 'echo \"Container shutdown requested\"; rm -f /run/.no_exit.pid /run/*.pid; exit 0' TERM INT + echo \$\$ > /run/.no_exit.pid while true; do if [ -n \"$monitor_services\" ] && [ \"$monitor_services\" != \"tini\" ]; then @@ -995,13 +995,13 @@ __start_init_scripts() { local retstatus="0" local initStatus="0" local critical_failures="0" - local pidFile="/run/__start_init_scripts.pid" + local pidFile="/run/.start_init_scripts.pid" local init_dir="${1:-/usr/local/etc/docker/init.d}" local init_count="$(ls -A "$init_dir"/* 2>/dev/null | grep -v '\.sample' | wc -l)" local exit_on_failure="${EXIT_ON_SERVICE_FAILURE:-true}" # Clean stale PID files from previous runs - if [ ! -f "/run/__start_init_scripts.pid" ]; then + if [ ! -f "/run/.start_init_scripts.pid" ]; then echo "🧹 Cleaning stale PID files from previous container run" rm -f /run/*.pid /run/init.d/*.pid 2>/dev/null || true fi @@ -1569,7 +1569,7 @@ __backup() { fi local exitCodeP=0 local exitStatus=0 - local pidFile="/run/backup.pid" + local pidFile="/run/.backup.pid" local logDir="/data/log/backups" maxDays="${BACKUP_MAX_DAYS:-$maxDays}" cronTime="${BACKUP_RUN_CRON:-$cronTime}" @@ -1649,7 +1649,7 @@ export LIGHTTPD_CONFIG_FILE="${LIGHTTPD_CONFIG_FILE:-$(__find_lighttpd_conf)}" export MARIADB_CONFIG_FILE="${MARIADB_CONFIG_FILE:-$(__find_mysql_conf)}" export POSTGRES_CONFIG_FILE="${POSTGRES_CONFIG_FILE:-$(__find_pgsql_conf)}" export MONGODB_CONFIG_FILE="${MONGODB_CONFIG_FILE:-$(__find_mongodb_conf)}" -export ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}" +export ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/.entrypoint.pid}" export ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" export ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" export ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" diff --git a/rootfs/usr/local/share/template-files/config/env/default.sample b/rootfs/usr/local/share/template-files/config/env/default.sample index 2d4a7ef..a5f0acb 100644 --- a/rootfs/usr/local/share/template-files/config/env/default.sample +++ b/rootfs/usr/local/share/template-files/config/env/default.sample @@ -116,7 +116,7 @@ DATABASE_DIR_SUPABASE="${DATABASE_DIR_SUPABASE:-$DATABASE_BASE_DIR/supabase}" DOCKER_HOST="unix://var/run/docker.sock" # - - - - - - - - - - - - - - - - - - - - - - - - - # File locations -ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}" +ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/.entrypoint.pid}" ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}" diff --git a/rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh b/rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh index cc9505b..bf86c7a 100644 --- a/rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh +++ b/rootfs/usr/local/share/template-files/config/env/examples/zz-entrypoint.sh @@ -1,6 +1,6 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # File locations -ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/init.d/entrypoint.pid}" +ENTRYPOINT_PID_FILE="${ENTRYPOINT_PID_FILE:-/run/.entrypoint.pid}" ENTRYPOINT_INIT_FILE="${ENTRYPOINT_INIT_FILE:-/config/.entrypoint.done}" ENTRYPOINT_DATA_INIT_FILE="${ENTRYPOINT_DATA_INIT_FILE:-/data/.docker_has_run}" ENTRYPOINT_CONFIG_INIT_FILE="${ENTRYPOINT_CONFIG_INIT_FILE:-/config/.docker_has_run}"