I am using ubuntu 12.04 to connect an openvpn server.
Two scripts update-resolv-conf and vpn-up.sh in /etc/openvpn should be executed then the connection established.
The commands following added to the configure file client.ovpn to make the two scripts run when openvpn connects and stop when openvpn disconnects:
script-security 2 up /etc/openvpn/update-resolv-conf up /etc/openvpn/vpn-up.sh down /etc/openvpn/vpn-down.sh down /etc/openvpn/update-resolv-conf
However, during connection only the first script is executed. And every time I have to run the script vpn-up.sh individually by hand. So I want to know how to get them both work when openvpn tunnel is established?