5 # Copyright 2010 Rene Ejury <opennet@absorb.it>
6 # Copyright 2014 Lars Kruse <devel@sumpfralle.de>
8 # Licensed under the Apache License, Version 2.0 (the "License");
9 # you may not use this file except in compliance with the License.
10 # You may obtain a copy of the License at
12 # http://www.apache.org/licenses/LICENSE-2.0
18 MSG_FILE=/tmp/openvpn_msg.txt
19 # die PATH-Umgebungsvariable beim Ausfuehren des openvpn-Skripts beinhaltet leider nicht die sbin-Verzeichnisse
20 IP_BIN=$(PATH=$PATH:/sbin:/usr/sbin which ip)
23 # Allgemeine openvpn-Ereignisbehandlung
26 # Sonder-Aktionen für mig-Verbindungen
27 case "$script_type" in
29 echo
"vpn-tunnel active" >
"$MSG_FILE" # a
short message
for the web frontend
30 uplink_table=$(on-
function get_variable
"ROUTING_TABLE_ON_UPLINK")
31 "$IP_BIN" route add
default via
"$route_vpn_gateway" table "$uplink_table" ||
true
36 esac 2>&1 | logger -t mig-updown