From 81989fc8267634fa75314b4f15f07a98d9c76168 Mon Sep 17 00:00:00 2001 From: casjay Date: Tue, 27 Aug 2024 15:36:11 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/usr/local/etc/docker/init.d/00-named.sh rootfs/usr/local/etc/docker/init.d/03-php-fpm.sh rootfs/usr/local/etc/docker/init.d/99-nginx.sh --- rootfs/usr/local/etc/docker/init.d/00-named.sh | 8 ++++---- rootfs/usr/local/etc/docker/init.d/03-php-fpm.sh | 8 ++++---- rootfs/usr/local/etc/docker/init.d/99-nginx.sh | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rootfs/usr/local/etc/docker/init.d/00-named.sh b/rootfs/usr/local/etc/docker/init.d/00-named.sh index 7a30278..0c5a7f2 100755 --- a/rootfs/usr/local/etc/docker/init.d/00-named.sh +++ b/rootfs/usr/local/etc/docker/init.d/00-named.sh @@ -674,16 +674,16 @@ __fix_permissions "$SERVICE_USER" "$SERVICE_GROUP" # __run_pre_execute_checks 2>/dev/stderr | tee -a -p "/data/logs/entrypoint.log" "/data/logs/init.txt" || exit 20 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__run_start_script 2>>/dev/stderr | tee -p -a "/data/logs/entrypoint.log" && errorCode=0 || errorCode=10 +__run_start_script 2>>/dev/stderr | tee -p -a "/data/logs/entrypoint.log" +errorCode=$? if [ -n "$EXEC_CMD_BIN" ]; then if [ "$errorCode" -eq 0 ]; then SERVICE_EXIT_CODE=0 SERVICE_IS_RUNNING="yes" else - echo "Failed to execute: ${cmd_exec:-$(eval echo "$EXEC_CMD_BIN $EXEC_CMD_ARGS")}" | tee -p -a "/data/logs/entrypoint.log" "/data/logs/init.txt" SERVICE_EXIT_CODE=$errorCode - rm -Rf "$SERVICE_PID_FILE" - SERVICE_IS_RUNNING="no" + SERVICE_IS_RUNNING="${SERVICE_IS_RUNNING:-no}" + [ -s "$SERVICE_PID_FILE" ] || rm -Rf "$SERVICE_PID_FILE" fi SERVICE_EXIT_CODE=0 fi diff --git a/rootfs/usr/local/etc/docker/init.d/03-php-fpm.sh b/rootfs/usr/local/etc/docker/init.d/03-php-fpm.sh index 031b696..28904ef 100755 --- a/rootfs/usr/local/etc/docker/init.d/03-php-fpm.sh +++ b/rootfs/usr/local/etc/docker/init.d/03-php-fpm.sh @@ -574,16 +574,16 @@ __fix_permissions "$SERVICE_USER" "$SERVICE_GROUP" # __run_pre_execute_checks 2>/dev/stderr | tee -a -p "/data/logs/entrypoint.log" "/data/logs/init.txt" || return 20 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__run_start_script 2>>/dev/stderr | tee -p -a "/data/logs/entrypoint.log" && errorCode=0 || errorCode=10 +__run_start_script 2>>/dev/stderr | tee -p -a "/data/logs/entrypoint.log" +errorCode=$? if [ -n "$EXEC_CMD_BIN" ]; then if [ "$errorCode" -eq 0 ]; then SERVICE_EXIT_CODE=0 SERVICE_IS_RUNNING="yes" else - echo "Failed to execute: ${cmd_exec:-$(eval echo "$EXEC_CMD_BIN $EXEC_CMD_ARGS")}" | tee -p -a "/data/logs/entrypoint.log" "/data/logs/init.txt" SERVICE_EXIT_CODE=$errorCode - rm -Rf "$SERVICE_PID_FILE" - SERVICE_IS_RUNNING="no" + SERVICE_IS_RUNNING="${SERVICE_IS_RUNNING:-no}" + [ -s "$SERVICE_PID_FILE" ] || rm -Rf "$SERVICE_PID_FILE" fi SERVICE_EXIT_CODE=0 fi diff --git a/rootfs/usr/local/etc/docker/init.d/99-nginx.sh b/rootfs/usr/local/etc/docker/init.d/99-nginx.sh index 8dec12a..83a16f3 100755 --- a/rootfs/usr/local/etc/docker/init.d/99-nginx.sh +++ b/rootfs/usr/local/etc/docker/init.d/99-nginx.sh @@ -574,16 +574,16 @@ __fix_permissions "$SERVICE_USER" "$SERVICE_GROUP" # __run_pre_execute_checks 2>/dev/stderr | tee -a -p "/data/logs/entrypoint.log" "/data/logs/init.txt" || return 20 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -__run_start_script 2>>/dev/stderr | tee -p -a "/data/logs/entrypoint.log" && errorCode=0 || errorCode=10 +__run_start_script 2>>/dev/stderr | tee -p -a "/data/logs/entrypoint.log" +errorCode=$? if [ -n "$EXEC_CMD_BIN" ]; then if [ "$errorCode" -eq 0 ]; then SERVICE_EXIT_CODE=0 SERVICE_IS_RUNNING="yes" else - echo "Failed to execute: ${cmd_exec:-$(eval echo "$EXEC_CMD_BIN $EXEC_CMD_ARGS")}" | tee -p -a "/data/logs/entrypoint.log" "/data/logs/init.txt" SERVICE_EXIT_CODE=$errorCode - rm -Rf "$SERVICE_PID_FILE" - SERVICE_IS_RUNNING="no" + SERVICE_IS_RUNNING="${SERVICE_IS_RUNNING:-no}" + [ -s "$SERVICE_PID_FILE" ] || rm -Rf "$SERVICE_PID_FILE" fi SERVICE_EXIT_CODE=0 fi