allow users to pass arguments to `nginx`
This commit is contained in:
parent
68c29dd167
commit
0ce21d49eb
|
|
@ -1,6 +1,10 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "${1}" == "nginx" -o "${1}" == "$(which nginx)" ]; then
|
||||
if [ "${1:0:1}" = '-' ]; then
|
||||
export EXTRA_OPTIONS="$@"
|
||||
set --
|
||||
elif [ "${1}" == "nginx" -o "${1}" == "$(which nginx)" ]; then
|
||||
export EXTRA_OPTIONS="${@:2}"
|
||||
set --
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
set -e
|
||||
source $BITNAMI_PREFIX/bitnami-utils.sh
|
||||
exec nginx -g "daemon off;"
|
||||
exec nginx -g "daemon off;" ${EXTRA_OPTIONS:+"$EXTRA_OPTIONS"}
|
||||
|
|
|
|||
Loading…
Reference in New Issue