Browse Source

Get the IPv6 delegated prefix from the VPN Client settings if the corresponding app is installed

Julien VAUBOURG 10 years ago
parent
commit
2fad7d2bce
1 changed files with 10 additions and 0 deletions
  1. 10 0
      scripts/install

+ 10 - 0
scripts/install

@@ -72,6 +72,16 @@ fi
 if [ -z "${ip6_net}" ]; then
   ip6_net=none
   ip6_addr=none
+
+  if [ -e /tmp/.ynh-vpnclient-started ]; then
+    vpnclient_ip6_net=$(sudo yunohost app setting vpnclient ip6_net 2>&1)
+    vpnclient_ip6_addr=$(sudo yunohost app setting vpnclient ip6_addr 2>&1)
+
+    if [[ "${vpnclient_ip6_net}" =~ :: && "${vpnclient_ip6_addr}" =~ :: ]]; then
+      ip6_net=${vpnclient_ip6_net}
+      ip6_addr=${vpnclient_ip6_addr}
+    fi
+  fi
 #else
 #  ip6_net=$(bash ../conf/ipv6_expanded "${ip6_net}")
 #