summaryrefslogtreecommitdiffstats
path: root/dns/bin/bfh-dns-clear
diff options
context:
space:
mode:
Diffstat (limited to 'dns/bin/bfh-dns-clear')
-rwxr-xr-xdns/bin/bfh-dns-clear30
1 files changed, 30 insertions, 0 deletions
diff --git a/dns/bin/bfh-dns-clear b/dns/bin/bfh-dns-clear
new file mode 100755
index 0000000..f8a7c2a
--- /dev/null
+++ b/dns/bin/bfh-dns-clear
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+set -e
+
+HOSTS="${*}"
+
+if [ -z "${HOSTS}" ]
+then
+ echo "Usage: ${0} {bfh.info|bfh.ch|HOST}"
+ exit 1
+fi
+
+case "${HOSTS}" in
+ bfh.info)
+ HOSTS="node1.dns.bfh.info node2.dns.bfh.info node3.dns.bfh.info node4.dns.bfh.info"
+ ;;
+
+ bfh.ch)
+ HOSTS="dns1.bfh.ch dns2.bfh.ch dns3.bfh.ch dns4.bfh.ch"
+ ;;
+esac
+
+for HOST in ${HOSTS}
+do
+ echo "################################################################################"
+ echo "# Flushing DNS cache on ${HOST}"
+ echo "################################################################################"
+
+ ssh "${HOST}" sudo kresd-cache-clear
+done