Add tun0 detection in the service

This commit is contained in:
Julien VAUBOURG
2014-11-14 20:05:51 +01:00
parent dee4de7dce
commit 5c742f8516
2 changed files with 7 additions and 6 deletions

1
TODO
View File

@@ -1,3 +1,4 @@
* Translate PHP interface in French
* Add connect-retry-max=3 in openvpn conf
* Support VPN without certificates (only login) -- added need just tests
** Add require for slapd for the service start -- added need just tests

View File

@@ -203,6 +203,12 @@ case "${1}" in
if [ ! $? -eq 0 ]; then
exit 1
fi
(i=0 && false) || while [ $? -ne 0 ]; do
sleep 1 && (( i++ ))
[ ${i} -gt 20 ] && exit 1
ip link show dev tun0 &> /dev/null
done
fi
# Check old state of the server ipv6 route
@@ -223,12 +229,6 @@ case "${1}" in
# Set the ipv6 address
if ! has_hotspot_app && has_ip6delegatedprefix && ! is_ip6addr_set; then
echo "Set IPv6 address"
false || while [ $? -ne 0 ]; do
sleep 1
ip link show dev tun0 &> /dev/null
done
set_ip6addr
fi
fi