diff --git a/rootfs/usr/local/etc/docker/init.d/01-php-fpm.sh b/rootfs/usr/local/etc/docker/init.d/01-php-fpm.sh index 3f49a06..2a9d093 100644 --- a/rootfs/usr/local/etc/docker/init.d/01-php-fpm.sh +++ b/rootfs/usr/local/etc/docker/init.d/01-php-fpm.sh @@ -123,9 +123,6 @@ __run_start_script() { esac } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# process check functions -__pcheck() { [ -n "$(type -P pgrep 2>/dev/null)" ] && pgrep -x "$1" &>/dev/null && return 0 || return 10; } -__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 # Import env file @@ -156,7 +153,6 @@ if [ ! -f "$(type -P "$EXEC_CMD_BIN")" ] && [ -z "$EXEC_CMD_BIN" ]; then exit 2 fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# check if process is already running if __pgrep "$EXEC_CMD_BIN"; then SERVICE_IS_RUNNING="true" echo "$EXEC_CMD_BIN is running" diff --git a/rootfs/usr/local/etc/docker/init.d/zz-caddy.sh b/rootfs/usr/local/etc/docker/init.d/zz-caddy.sh index 648093a..721d352 100644 --- a/rootfs/usr/local/etc/docker/init.d/zz-caddy.sh +++ b/rootfs/usr/local/etc/docker/init.d/zz-caddy.sh @@ -118,9 +118,6 @@ __run_start_script() { esac } # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# process check functions -__pcheck() { [ -n "$(type -P pgrep 2>/dev/null)" ] && pgrep -x "$1" &>/dev/null && return 0 || return 10; } -__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 # Import env file @@ -151,7 +148,6 @@ if [ ! -f "$(type -P "$EXEC_CMD_BIN")" ] && [ -z "$EXEC_CMD_BIN" ]; then exit 2 fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# check if process is already running if __pgrep "$EXEC_CMD_BIN"; then SERVICE_IS_RUNNING="true" echo "$EXEC_CMD_BIN is running"