shutdown nginx correctly
parent
7aa91330ff
commit
b6b6dc4228
|
@ -18,6 +18,25 @@ files:
|
|||
exit 0
|
||||
fi
|
||||
|
||||
/opt/elasticbeanstalk/hooks/configdeploy/post/99_kill_default_nginx.sh:
|
||||
mode: "000755"
|
||||
owner: root
|
||||
group: root
|
||||
content: |
|
||||
#!/bin/bash -xe
|
||||
rm -f /etc/nginx/conf.d/00_elastic_beanstalk_proxy.conf
|
||||
status=`/sbin/status nginx`
|
||||
|
||||
if [[ $status = *"start/running"* ]]; then
|
||||
echo "stopping nginx..."
|
||||
stop nginx
|
||||
echo "starting nginx..."
|
||||
start nginx
|
||||
else
|
||||
echo "nginx is not running... starting it..."
|
||||
start nginx
|
||||
fi
|
||||
|
||||
container_commands:
|
||||
00_appdeploy_rewrite_hook:
|
||||
command: cp -v /tmp/45_nginx_https_rw.sh /opt/elasticbeanstalk/hooks/appdeploy/enact
|
||||
|
|
Loading…
Reference in New Issue