Commit 47aaf0a0 authored by thomas.forbriger's avatar thomas.forbriger

BFO2LSDF [FEATURE]: use openvpn instead of vpnc

parent 7b128e40
......@@ -36,7 +36,8 @@
# ============================================================================
#
TUN_INTERFACE=tun0
# VPN tunnel interface
TUN_INTERFACE=tap0
# approx. 80% of 256 kBit/second
BWLIMIT=20
EXCLUDE="--exclude='.lock'"
......@@ -97,18 +98,26 @@ do
${LOGGER} -i -p user.info "${LOGINFO} VPN connection already had been \
established using IP ${tunIPs}."
else
# start juniper network client
${JNC} --nox kit > /dev/null 2>&1
# start openvpn (requires appropriate system configuration)
sudo /usr/sbin/openvpn /etc/openvpn/scc.ovpn.bromo > /dev/null 2>&1
if [ $? -ne 0 ]
then
${LOGGER} -i -p user.err "${LOGERROR} Could not establish VPN \
connection."
exit 2
else
tunIPs=$(${IP} addr show ${TUN_INTERFACE} | ${GREP} -e "inet" | \
awk '{print $2}')
${LOGGER} -i -p user.info "${LOGINFO} VPN connection successfully \
established using IP ${tunIPs}."
${IP} addr show ${TUN_INTERFACE} > /dev/null 2>&1
if [ $? -eq 0 ]
then
tunIPs=$(${IP} addr show ${TUN_INTERFACE} | ${GREP} -e "inet" | \
awk '{print $2}')
${LOGGER} -i -p user.info "${LOGINFO} VPN connection already had been \
established using IP ${tunIPs}."
else
${LOGGER} -i -p user.err "${LOGERROR} Could not establish VPN \
connection."
exit 2
fi
fi
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment