Skip to content

Commit

Permalink
fix logging for resolv
Browse files Browse the repository at this point in the history
  • Loading branch information
binhex committed Jun 28, 2024
1 parent f17825b commit 79d7a18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion run/root/iptable-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ function add_name_servers() {
# strip whitespace from start and end of name_server_item
name_server_item=$(echo "${name_server_item}" | sed -e 's~^[ \t]*~~;s~[ \t]*$~~')

echo "[info] Adding ${name_server_item} to /etc/resolv.conf"
if [[ "${DEBUG}" == "true" ]]; then
echo "[debug] Adding ${name_server_item} to /etc/resolv.conf..." | ts '%Y-%m-%d %H:%M:%.S'
fi

echo "nameserver ${name_server_item}" >> /etc/resolv.conf

done
Expand Down

0 comments on commit 79d7a18

Please sign in to comment.