- #!/bin/bash
- is_ip6addr_set() {
- local ip6_addr=${1}
- ip address show dev tun0 2> /dev/null | grep -q "${ip6_addr}/"
- }
- ip6_addr=$(yunohost app setting "vpnclient" "ip6_addr")
- if [[ -n "${ip6_addr}" ]] && [[ "${ip6_addr}" != none ]] && is_ip6addr_set "${ip6_addr}"; then
- ip address delete "${ip6_addr}/64" dev tun0
- fi
|