silence some more SSH and postscreen messages
[ansible.git] / roles / unbound / templates / fix-dns
1 #!/bin/bash
2 set -e
3
4 # Fix for some providers messing with DNS settings
5 if ! diff /etc/resolv.conf /etc/resolv.conf.unbound > /dev/null; then
6         echo "Someone messed up our DNS! Fixing it..."
7         cp /etc/resolv.conf.unbound /etc/resolv.conf
8 {% if 'email' in group_names %}
9         # Just to make sure postfix uses the new settings
10         systemctl restart postfix
11 {% endif %}
12 fi