summaryrefslogtreecommitdiffstats
path: root/modules/retiolum/bin/update_tinc_hosts
diff options
context:
space:
mode:
authorFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-29 15:48:47 +0200
committerFelix Richter <Felix.Richter@syntax-fehler.de>2011-05-29 15:48:47 +0200
commit590f55d10dd4ce2e00ecf422e38385d3c7bace29 (patch)
treea4e07d12b5763bd667438dce18ad092127ec4233 /modules/retiolum/bin/update_tinc_hosts
parent427bdf4e2093217f967384f785e3907930a74a21 (diff)
parente0ec5d2e8560ae433ee677622b24ba82dbe7630b (diff)
Merge branch 'master' of github.com:krebscode/painload
Diffstat (limited to 'modules/retiolum/bin/update_tinc_hosts')
-rwxr-xr-xmodules/retiolum/bin/update_tinc_hosts33
1 files changed, 0 insertions, 33 deletions
diff --git a/modules/retiolum/bin/update_tinc_hosts b/modules/retiolum/bin/update_tinc_hosts
deleted file mode 100755
index 2d5cf957..00000000
--- a/modules/retiolum/bin/update_tinc_hosts
+++ /dev/null
@@ -1,33 +0,0 @@
-#! /bin/sh
-set -euf
-
-if test "${nosudo-false}" != true -a `id -u` != 0; then
- echo "we're going sudo..." >&2
- exec sudo "$0" "$@"
- exit 23 # go to hell
-fi
-
-DIRNAME=`dirname $0`
-export PATH="`readlink -f $DIRNAME`:$PATH"
-
-hosts="${hosts-/etc/hosts}"
-
-bs='# BEGIN OF RETIOLUM'
-es='# END OF RETIOLUM'
-
-case "${1-imstupid}" in
- (start|restart)
- if grep -q "^$bs$" $hosts && grep -q "^$es$" $hosts; then
- $0 stop
- echo "$bs" >> $hosts
- hosts >> $hosts
- echo "$es" >> $hosts
- fi
- ;;
- (stop)
- sed -ie "/^$bs$/,/^$es$/d" $hosts
- ;;
- (*)
- echo 'Error 1: You are made of stupid!' >&2
- exit 23
-esac