diff --git a/plugins/nginx-vhosts/core-post-extract b/plugins/nginx-vhosts/core-post-extract index 70b7d6a09..04cd81dac 100755 --- a/plugins/nginx-vhosts/core-post-extract +++ b/plugins/nginx-vhosts/core-post-extract @@ -8,7 +8,7 @@ fn-nginx-vhosts-copy-from-image() { declare APP="$1" IMAGE_NAME="$2" CONF_SIGIL_PATH="$3" mkdir -p "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP" - rm -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil."* + find "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/" -maxdepth 1 -type f -name 'nginx.conf.sigil.*' -delete copy_from_image "$IMAGE_NAME" "$CONF_SIGIL_PATH" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" 2>/dev/null || true if [[ ! -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" ]]; then touch "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID.missing" @@ -31,7 +31,7 @@ fn-nginx-vhosts-copy-from-directory() { return fi - rm -f "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil."* + find "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/" -maxdepth 1 -type f -name 'nginx.conf.sigil.*' -delete cp -f "$CONF_SIGIL_PATH" "${DOKKU_LIB_ROOT}/data/nginx-vhosts/app-$APP/nginx.conf.sigil.$DOKKU_PID" popd &>/dev/null || pushd "/tmp" >/dev/null } diff --git a/plugins/openresty-vhosts/core-post-extract b/plugins/openresty-vhosts/core-post-extract index e30bba6c6..b467069fc 100755 --- a/plugins/openresty-vhosts/core-post-extract +++ b/plugins/openresty-vhosts/core-post-extract @@ -8,7 +8,7 @@ fn-openresty-vhosts-copy-from-image() { declare APP="$1" IMAGE_NAME="$2" CONF_PATH="$3" mkdir -p "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP" - rm -f "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP/openresty-http-includes."* + find "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP/" -maxdepth 1 -name 'openresty-http-includes.*' -delete copy_dir_from_image "$IMAGE_NAME" "$CONF_PATH" "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP/openresty-http-includes.$DOKKU_PID" || true if [[ ! -f "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP/openresty-http-includes.$DOKKU_PID" ]]; then touch "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP/openresty-http-includes.$DOKKU_PID.missing" @@ -31,7 +31,7 @@ fn-openresty-vhosts-copy-from-directory() { return fi - rm -f "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP/openresty-http-includes."* + find "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP/" -maxdepth 1 -name 'openresty-http-includes.*' -delete mkdir p "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP/openresty-http-includes.$DOKKU_PID/" cp -f "$CONF_PATH"/* "${DOKKU_LIB_ROOT}/data/openresty-vhosts/app-$APP/openresty-http-includes.$DOKKU_PID/" popd &>/dev/null || pushd "/tmp" >/dev/null diff --git a/plugins/scheduler-docker-local/core-post-extract b/plugins/scheduler-docker-local/core-post-extract index f8809136f..d0a130ac8 100755 --- a/plugins/scheduler-docker-local/core-post-extract +++ b/plugins/scheduler-docker-local/core-post-extract @@ -9,7 +9,7 @@ fn-scheduler-docker-local-copy-from-image() { declare APP="$1" IMAGE_NAME="$2" CHECKS_PATH="$3" mkdir -p "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP" - rm -f "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/CHECKS."* + find "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/" -maxdepth 1 -type f -name 'CHECKS.*' -delete copy_from_image "$IMAGE_NAME" "$CHECKS_PATH" "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/CHECKS.$DOKKU_PID" 2>/dev/null || true if [[ ! -f "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/CHECKS.$DOKKU_PID" ]]; then touch "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/CHECKS.$DOKKU_PID.missing" @@ -32,7 +32,7 @@ fn-scheduler-docker-local-copy-from-directory() { return fi - rm -f "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/CHECKS."* + find "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/" -maxdepth 1 -type f -name 'CHECKS.*' -delete cp -f "$CHECKS_PATH" "${DOKKU_LIB_ROOT}/data/scheduler-docker-local/$APP/CHECKS.$DOKKU_PID" popd &>/dev/null || pushd "/tmp" >/dev/null }