add tinc-down.local hook
This commit is contained in:
parent
5852ac2650
commit
5127847eff
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ ed25519_key.priv
|
||||
tinc.conf
|
||||
tincrc
|
||||
tinc-up.local
|
||||
tinc-down.local
|
||||
|
@ -21,4 +21,5 @@ elif has dhclient; then
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then # TODO untested
|
||||
ipconfig set "$interface" NONE
|
||||
fi
|
||||
exit 0
|
||||
|
||||
[ -x "${DIR}/tinc-down.local" ] && "${DIR}/tinc-down.local" || true
|
||||
|
4
tinc-up
4
tinc-up
@ -131,7 +131,7 @@ if [ -n "$SUBNET" ]; then
|
||||
IFS=' ' read ip netmask <<< "$SUBNET"
|
||||
[ -z "$ip" ] && die "no ip set in SUBNET"
|
||||
[ -z "$netmask" ] && die "no netmask set in SUBNET"
|
||||
set_ip "$INTERFACE" "$IP" "$NETMASK"
|
||||
set_ip "$INTERFACE" "$ip" "$netmask"
|
||||
fi
|
||||
|
||||
if [ "${DHCP,,}" = "yes" ]; then
|
||||
@ -142,4 +142,4 @@ if [[ "${IPV6_PRIVACY,,}" != "yes" ]]; then
|
||||
disable_ipv6_privacy "$INTERFACE"
|
||||
fi
|
||||
|
||||
[ -x "$LOCAL_HOOK_FILE" ] && "$LOCAL_HOOK_FILE" || true
|
||||
[ -x "${DIR}/tinc-up.local" ] && "${DIR}/tinc-up.local" || true
|
||||
|
Loading…
Reference in New Issue
Block a user