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/update-retiolum-hosts') 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 From 994d24e5614e5c5dac16cd9b9cc6c2f5a7206321 Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 12 Aug 2011 23:30:44 +0200 Subject: retiolum/bin: update hosts together with tinc tincd will be forced to update it's known hosts via signals --- retiolum/bin/update-retiolum-hosts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'retiolum/bin/update-retiolum-hosts') diff --git a/retiolum/bin/update-retiolum-hosts b/retiolum/bin/update-retiolum-hosts index 57a8381a..7b2fa0e5 100755 --- a/retiolum/bin/update-retiolum-hosts +++ b/retiolum/bin/update-retiolum-hosts @@ -9,3 +9,5 @@ fi mkdir -v -p /etc/tinc/retiolum/hosts cp -v -r hosts/* /etc/tinc/retiolum/hosts +pkill -HUP tincd +pkill -ALRM tincd -- cgit v1.2.3