#!/bin/sh

. /etc/init.d/utils

if [ "$trusted_ip" != "" ]; then
    peer="$trusted_ip"
else
    peer="$remote_1"
fi

if [ "tun2" != "$1" ]; then
    error "Interface mismatch in openvpn-up ($1 != tun2)"
    exit 1
fi

logger -t "ovpn-tunnel2" "setting mtu of 1400"
/sbin/ifconfig tun2 mtu 1400

# call main up
/usr/local/sbin/www-scripts/openvpn/tunnel-up "2" "tun2" "client" "$peer"
exit 0
