openstack-helm/glance/templates/bin/_nginx.sh.tpl
Andrii Ostapenko 0a1fa6c7b0
Make glance nginx.sh POSIX compatible
'function' keyword is a bash extension and not recognizable by sh.

Change-Id: I96205e337a28e12f3e3d06ca99e5f04e0f9a38f4
Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
2020-08-11 01:30:09 -05:00

18 lines
231 B
Smarty

#!/bin/sh
set -xe
COMMAND="${@:-start}"
start () {
envsubst < /etc/nginx/nginx.conf > /tmp/nginx.conf
cat /tmp/nginx.conf
nginx -t -c /tmp/nginx.conf
exec nginx -c /tmp/nginx.conf
}
stop () {
nginx -s stop
}
$COMMAND