ovpn-client 300 Bytes
Newer Older
1
#!/usr/bin/python -S
2 3
import os, sys

Julien Muchembled's avatar
typo  
Julien Muchembled committed
4
if os.environ['script_type'] == 'up':
5
    os.execlp('ip', 'ip', 'link', 'set', os.environ['dev'], 'up')
6 7

# Write into pipe external ip address received
8
os.write(int(sys.argv[1]), '%(script_type)s %(OPENVPN_external_ip)s,%(OPENVPN_external_port)s\n' % os.environ)