#! /bin/bash echo 'Starting nginx' NAMESERVER=`cat /etc/resolv.conf | grep "nameserver" | awk '{print $2}' | tr '\n' ' '` echo "resolver $NAMESERVER valid=10s;" > /conf/nginx/resolver.conf /usr/sbin/nginx -c /conf/nginx/nginx.conf echo 'Nginx exited'