Merge pull request #363 from bkmartin/dev
restart openvpn if the up script is executed and no ipv4 is bound
This commit is contained in:
@@ -5,6 +5,13 @@
|
|||||||
|
|
||||||
# This script will be called with tun/tap device name as parameter 1, and local IP as parameter 4
|
# This script will be called with tun/tap device name as parameter 1, and local IP as parameter 4
|
||||||
# See https://openvpn.net/index.php/open-source/documentation/manuals/65-openvpn-20x-manpage.html (--up cmd)
|
# See https://openvpn.net/index.php/open-source/documentation/manuals/65-openvpn-20x-manpage.html (--up cmd)
|
||||||
|
echo "Up script executed with $*"
|
||||||
|
if [ "$4" = "" ]; then
|
||||||
|
echo "ERROR, unable to obtain tunnel address"
|
||||||
|
echo "killing $PPID"
|
||||||
|
kill -9 $PPID
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
echo "Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of $1 : $4"
|
echo "Updating TRANSMISSION_BIND_ADDRESS_IPV4 to the ip of $1 : $4"
|
||||||
export TRANSMISSION_BIND_ADDRESS_IPV4=$4
|
export TRANSMISSION_BIND_ADDRESS_IPV4=$4
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user