10 lines
220 B
Bash
10 lines
220 B
Bash
#!/bin/sh
|
|
set -e
|
|
|
|
NAMESERVER=$(awk '/^nameserver/{print $2; exit}' /etc/resolv.conf)
|
|
NAMESERVER=${NAMESERVER:-127.0.0.11}
|
|
|
|
sed -i "s/__RESOLVER__/$NAMESERVER/" /etc/nginx/conf.d/default.conf
|
|
|
|
exec nginx -g "daemon off;"
|