From 2048448601aa27f993268ef67bf0eeda3625ef4e Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 12 Aug 2011 23:23:33 +0200 Subject: retiolum: go more enterprise --- retiolum/bin/update-retiolum-hosts | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 retiolum/bin/update-retiolum-hosts (limited to 'retiolum/bin') diff --git a/retiolum/bin/update-retiolum-hosts b/retiolum/bin/update-retiolum-hosts new file mode 100755 index 00000000..57a8381a --- /dev/null +++ b/retiolum/bin/update-retiolum-hosts @@ -0,0 +1,11 @@ +#! /bin/sh +set -eu + +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 + +mkdir -v -p /etc/tinc/retiolum/hosts +cp -v -r hosts/* /etc/tinc/retiolum/hosts -- cgit v1.2.3