Skip to content

Commit 53b4786

Browse files
committed
fix quote
1 parent bdc0f76 commit 53b4786

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,18 @@ create_tmp_dir
2222
create_siteconf_dir
2323

2424
#允许参数传递到nginx
25-
if [[ ${1:0:1} = '-' ]]; then
25+
if [[ "${1:0:1}" = '-' ]]; then
2626
#e.g: -g "daemon off;"
2727
EXTRA_ARGS="$@"
2828
set --
29-
elif [[ ${1} == nginx || ${1} == $(which nginx) ]]; then
29+
elif [[ "${1}" == nginx || "${1}" == $(which nginx) ]]; then
3030
#e.g: nginx -g "daemon off;"
3131
EXTRA_ARGS="${@:5}" #fix busybox
3232
#EXTRA_ARGS="${@:2}"
3333
set --
3434
fi
3535

36-
if [[ -z ${1} ]]; then
36+
if [[ -z "${1}" ]]; then
3737
echo "Starting nginx..."
3838
exec $(which nginx) -c /etc/nginx/nginx.conf -g "daemon off;" ${EXTRA_ARGS}
3939
else

setup/install.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ apk add --no-cache --virtual .build-deps ${BUILD_DEPENDENCIES}
2727
${WITH_NDK} && {
2828
EXTRA_ARGS="${EXTRA_ARGS} --add-module=${NGINX_SETUP_DIR}/ngx_devel_kit-${NGINX_DEVEL_KIT_VERSION}"
2929
curl -fSL "${NGINX_DEVEL_KIT_URL}" -o "${NGINX_SETUP_DIR}/ngx_devel_kit.tar"
30-
tar -zxC "${NGINX_SETUP_DIR}" -f "${NGINX_SETUP_DIR}/ngx_devel_kit.tar"
30+
tar -zxC "${NGINX_SETUP_DIR}" -f "${NGINX_SETUP_DIR}/ngx_devel_kit.tar"
3131
}
3232

3333
# prepare ngx_cache_purge module support
3434
${WITH_PURGE} && {
3535
EXTRA_ARGS="${EXTRA_ARGS} --add-module=${NGINX_SETUP_DIR}/ngx_cache_purge-${NGINX_CACHE_PURGE_VERSION}"
3636
curl -fSL "${NGINX_CACHE_PURGE_URL}" -o "${NGINX_SETUP_DIR}/ngx_cache_purge.tar"
37-
tar -zxC "${NGINX_SETUP_DIR}" -f "${NGINX_SETUP_DIR}/ngx_cache_purge.tar"
37+
tar -zxC "${NGINX_SETUP_DIR}" -f "${NGINX_SETUP_DIR}/ngx_cache_purge.tar"
3838
}
3939

4040
# prepare ngx_upstream_check module support
@@ -163,12 +163,12 @@ RUN_DEPENDENCIES="$( \
163163
apk add --no-cache --virtual .nginx-rundeps $RUN_DEPENDENCIES
164164

165165
# cleanup
166-
apk del .build-deps
166+
apk del .build-deps
167167
apk del .gettext
168168
mv /tmp/envsubst /usr/local/bin/
169169
cd /
170170
rm -rf ${NGINX_SETUP_DIR}/
171171

172172
# forward request and error logs to docker log collector
173-
ln -sf /dev/stdout /var/log/nginx/access.log
174-
ln -sf /dev/stderr /var/log/nginx/error.log
173+
ln -sf /dev/stdout /var/log/nginx/access.log
174+
ln -sf /dev/stderr /var/log/nginx/error.log

0 commit comments

Comments
 (0)