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

BFO2LSDF [FEATURE]: use openvpn instead of vpnc

parent 7b128e40
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
# ============================================================================ # ============================================================================
# #
TUN_INTERFACE=tun0 # VPN tunnel interface
TUN_INTERFACE=tap0
# approx. 80% of 256 kBit/second # approx. 80% of 256 kBit/second
BWLIMIT=20 BWLIMIT=20
EXCLUDE="--exclude='.lock'" EXCLUDE="--exclude='.lock'"
...@@ -97,18 +98,26 @@ do ...@@ -97,18 +98,26 @@ do
${LOGGER} -i -p user.info "${LOGINFO} VPN connection already had been \ ${LOGGER} -i -p user.info "${LOGINFO} VPN connection already had been \
established using IP ${tunIPs}." established using IP ${tunIPs}."
else else
# start juniper network client # start openvpn (requires appropriate system configuration)
${JNC} --nox kit > /dev/null 2>&1 sudo /usr/sbin/openvpn /etc/openvpn/scc.ovpn.bromo > /dev/null 2>&1
if [ $? -ne 0 ] if [ $? -ne 0 ]
then then
${LOGGER} -i -p user.err "${LOGERROR} Could not establish VPN \ ${LOGGER} -i -p user.err "${LOGERROR} Could not establish VPN \
connection." connection."
exit 2 exit 2
else else
tunIPs=$(${IP} addr show ${TUN_INTERFACE} | ${GREP} -e "inet" | \ ${IP} addr show ${TUN_INTERFACE} > /dev/null 2>&1
awk '{print $2}') if [ $? -eq 0 ]
${LOGGER} -i -p user.info "${LOGINFO} VPN connection successfully \ then
established using IP ${tunIPs}." 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
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