summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2014-03-29 17:47:37 -0400
committerJune McEnroe <june@causal.agency>2014-03-29 17:47:37 -0400
commit05868c1f2c33cc6d64fb0da88670a20f2b292ee1 (patch)
tree5e762ecf47c6093e3a9d249d3a2954930c476304
parentRename home.programble.me alias to tunnel (diff)
downloadsrc-05868c1f2c33cc6d64fb0da88670a20f2b292ee1.tar.gz
src-05868c1f2c33cc6d64fb0da88670a20f2b292ee1.zip
Add gdns
Diffstat (limited to '')
-rwxr-xr-xbin/gdns11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/gdns b/bin/gdns
new file mode 100755
index 00000000..9433ba00
--- /dev/null
+++ b/bin/gdns
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+if grep -q 'gdns.sh' /etc/resolv.conf; then
+  sed -i '1,3d' /etc/resolv.conf
+  echo 'Google DNS removed'
+else
+  sed -i '1i # Added by gdns.sh' /etc/resolv.conf
+  sed -i '2i nameserver 8.8.8.8' /etc/resolv.conf
+  sed -i '3i nameserver 8.8.4.4' /etc/resolv.conf
+  echo 'Google DNS added'
+fi