summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xImmaeEu-up3
1 files changed, 2 insertions, 1 deletions
diff --git a/ImmaeEu-up b/ImmaeEu-up
index e9a4c9f..006b86f 100755
--- a/ImmaeEu-up
+++ b/ImmaeEu-up
@@ -8,6 +8,7 @@
8# Give it the right ip and netmask. Remember, the subnet of the 8# Give it the right ip and netmask. Remember, the subnet of the
9# tap device must be larger than that of the individual Subnets 9# tap device must be larger than that of the individual Subnets
10# as defined in the host configuration file! 10# as defined in the host configuration file!
11SCRIPT_DIR=$(dirname -- "$( readlink -f -- "$0"; )")
11SUBDOMAIN=$(echo "$NAME" | sed -e "s/\([A-Z][a-z0-9]*\)/\L\1 /g;" | awk '{ for (i=NF; i>1; i--) printf("%s.",$i); print $1; }') 12SUBDOMAIN=$(echo "$NAME" | sed -e "s/\([A-Z][a-z0-9]*\)/\L\1 /g;" | awk '{ for (i=NF; i>1; i--) printf("%s.",$i); print $1; }')
12while [ -z "$MYIPS" -o -z "$GWIP" ]; do 13while [ -z "$MYIPS" -o -z "$GWIP" ]; do
13 MYIPS=`getent hosts ${SUBDOMAIN}.immae.eu | cut -d' ' -f1 | tr "\\n" ' '` 14 MYIPS=`getent hosts ${SUBDOMAIN}.immae.eu | cut -d' ' -f1 | tr "\\n" ' '`
@@ -23,4 +24,4 @@ for MYIP in $MYIPS; do
23 ip -6 rule add to $MYIP/96 table 655 24 ip -6 rule add to $MYIP/96 table 655
24done 25done
25ip -6 route add default via $GWIP dev $INTERFACE table 655 26ip -6 route add default via $GWIP dev $INTERFACE table 655
26(cd /etc/tinc/$NETNAME/hosts && git pull -q origin master) || true 27(cd "$SCRIPT_DIR" && git pull -q origin master) || true