diff options
author | tv <tv@xso> | 2011-08-12 23:23:33 +0200 |
---|---|---|
committer | tv <tv@xso> | 2011-08-12 23:23:33 +0200 |
commit | 2048448601aa27f993268ef67bf0eeda3625ef4e (patch) | |
tree | 1e7dcd3ec26e20e14bca59418ea3a84fbfc48fc9 /retiolum/bin | |
parent | 533add06bf1c5dfb2824c4f861b9288fe5448c4d (diff) |
retiolum: go more enterprise
Diffstat (limited to 'retiolum/bin')
-rwxr-xr-x | retiolum/bin/update-retiolum-hosts | 11 |
1 files changed, 11 insertions, 0 deletions
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 |