Update create.sh

This commit is contained in:
tschettervictor
2025-05-21 12:13:11 -06:00
committed by GitHub
parent 395ef3de1e
commit 1f0a03e34f

View File

@@ -692,7 +692,8 @@ create_jail() {
# Apply nameserver (if set)
if [ -n "${OPT_NAMESERVER}" ]; then
sed -i '' "s#nameserver.*#nameserver ${OPT_NAMESERVER}#" "${bastille_jail_resolv_conf}"
sed -i '' "/^nameserver.*/d" "${bastille_jail_resolv_conf}"
echo "nameserver ${OPT_NAMESERVER}" >> "${bastille_jail_resolv_conf}"
fi
# Apply values changed by the template. -- cwells