diff options
-rwxr-xr-x | ImmaeEu-up | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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! |
11 | SCRIPT_DIR=$(dirname -- "$( readlink -f -- "$0"; )") | ||
11 | SUBDOMAIN=$(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; }') | 12 | SUBDOMAIN=$(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; }') |
12 | while [ -z "$MYIPS" -o -z "$GWIP" ]; do | 13 | while [ -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 |
24 | done | 25 | done |
25 | ip -6 route add default via $GWIP dev $INTERFACE table 655 | 26 | ip -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 |