diff options
Diffstat (limited to 'retiolum/bin/update-retiolum-hosts')
| -rwxr-xr-x | retiolum/bin/update-retiolum-hosts | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/retiolum/bin/update-retiolum-hosts b/retiolum/bin/update-retiolum-hosts new file mode 100755 index 00000000..eb57af3f --- /dev/null +++ b/retiolum/bin/update-retiolum-hosts @@ -0,0 +1,14 @@ +#! /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 + +# cd //retiolum +cd $(dirname $(readlink -f $0))/.. + +mkdir -p /etc/tinc/retiolum/hosts +rsync -va -I --delete hosts/ /etc/tinc/retiolum/hosts/ |
