biblogram/buildfiles/startservice.sh

14 lines
250 B
Bash
Raw Permalink Normal View History

2023-01-20 09:06:25 +05:00
#!/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 $?