From 016cdf2eb4ab7e720f8613ce7f66dae5eb5a719d Mon Sep 17 00:00:00 2001 From: casjay Date: Mon, 27 Mar 2023 11:44:36 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20=20Committing=20everyth?= =?UTF-8?q?ing=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 --- Dockerfile | 4 ++-- rootfs/usr/local/etc/docker/init.d/00-aria2c.sh | 2 +- rootfs/usr/local/etc/docker/init.d/zz-nginx.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index f80a274..4518ce1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -75,8 +75,8 @@ RUN set -ex; \ RUN echo "$TIMEZONE" >"/etc/timezone" ; \ echo 'hosts: files dns' >"/etc/nsswitch.conf" ; \ [ -f "/usr/share/zoneinfo/${TZ}" ] && ln -sf "/usr/share/zoneinfo/${TZ}" "/etc/localtime" ; \ - PHP_FPM="$(ls /usr/*bin/php*fpm* 2>/dev/null)" ; \ - [ -n "$PHP_FPM" ] && [ -z "$(type -P php-fpm)" ] && ln -sf "$PHP_FPM" "/usr/bin/php-fpm" ; \ + PHP_FPM="$(ls /usr/*bin/php*fpm* 2>/dev/null || echo '')" ; \ + [ -n "$PHP_FPM" ] && [ -z "$(type -P php-fpm)" ] && ln -sf "$PHP_FPM" "/usr/bin/php-fpm" || true ; \ if [ -f "/etc/profile.d/color_prompt.sh.disabled" ]; then mv -f "/etc/profile.d/color_prompt.sh.disabled" "/etc/profile.d/color_prompt.sh"; fi RUN touch "/etc/profile" "/root/.profile" ; \ diff --git a/rootfs/usr/local/etc/docker/init.d/00-aria2c.sh b/rootfs/usr/local/etc/docker/init.d/00-aria2c.sh index db8ad57..7c10a58 100755 --- a/rootfs/usr/local/etc/docker/init.d/00-aria2c.sh +++ b/rootfs/usr/local/etc/docker/init.d/00-aria2c.sh @@ -98,7 +98,7 @@ __pcheck() { [ -n "$(type -P pgrep 2>/dev/null)" ] && pgrep -x "$1" &>/dev/null __pgrep() { __pcheck "${1:-EXEC_CMD_BIN}" || __ps aux 2>/dev/null | grep -Fw " ${1:-$EXEC_CMD_BIN}" | grep -qv ' grep' | grep '^' && return 0 || return 10; } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Allow ENV_ variable -[ -f "/config/env/$EXEC_CMD_BIN.sh" ] && "/config/env/$EXEC_CMD_BIN.sh" # Import env file +[ -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" ] && "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" # Import env file # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WORKDIR="${ENV_WORKDIR:-$WORKDIR}" # change to directory SERVICE_USER="${ENV_SERVICE_USER:-$SERVICE_USER}" # execute command as another user diff --git a/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh b/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh index 4c87b27..9e69976 100755 --- a/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-nginx.sh @@ -91,7 +91,7 @@ __pcheck() { [ -n "$(type -P pgrep 2>/dev/null)" ] && pgrep -x "$1" &>/dev/null __pgrep() { __pcheck "${1:-EXEC_CMD_BIN}" || __ps aux 2>/dev/null | grep -Fw " ${1:-$EXEC_CMD_BIN}" | grep -qv ' grep' | grep '^' && return 0 || return 10; } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Allow ENV_ variable -[ -f "/config/env/$EXEC_CMD_BIN.sh" ] && "/config/env/$EXEC_CMD_BIN.sh" # Import env file +[ -f "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" ] && "/config/env/${SERVICE_NAME:-$SCRIPT_NAME}.sh" # Import env file # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - WORKDIR="${ENV_WORKDIR:-$WORKDIR}" # change to directory SERVICE_USER="${ENV_SERVICE_USER:-$SERVICE_USER}" # execute command as another user