14 lines
250 B
Bash
14 lines
250 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
if ! [ -f /etc/nginx/nginx.conf ]
|
||
|
then cp -r /root/nginx/* /etc/nginx
|
||
|
fi
|
||
|
|
||
|
#Start Nginx
|
||
|
/usr/sbin/nginx -g 'daemon off; master_process on;' &
|
||
|
|
||
|
# Wait for any process to exit
|
||
|
wait -n
|
||
|
# Exit with status of process that exited first
|
||
|
exit $?
|