Openvpn client script

Help and discussion about non-Linux operating systems

Moderators: ChrisThornett, LXF moderators

Openvpn client script

Postby pk_fox » Sun Jul 27, 2014 9:42 am

Title says it really, I have a script which mounts a share on my VPN server but I can't get it to fire when I connect using OpenVpn Connect , the lines I've added to my .ovpn file are shown below

Code:
script-security 2
up /system/xbin/mymount.sh


the script has executable permissions and works perfectly from a command prompt but its not being executed by OpenVpn
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK

Postby nelz » Sun Jul 27, 2014 10:34 am

What's in the script? OpenVPN will not be executing it from the same environment as your shell. It may be something as simple as a command not in OpenVPN's $PATH.
"Insanity: doing the same thing over and over again and expecting different results." (Albert Einstein)
User avatar
nelz
Site admin
 
Posts: 8498
Joined: Mon Apr 04, 2005 11:52 am
Location: Warrington, UK

Postby pk_fox » Sun Jul 27, 2014 1:08 pm

nelz wrote:What's in the script? OpenVPN will not be executing it from the same environment as your shell. It may be something as simple as a command not in OpenVPN's $PATH.



The script contains a mount command ( full qualified path i.e. /system/bin/mount ) to mount the VPN on a local folder but I read somewhere that the up scripts run before the VPN is up so it's not going to work anyway - seems weird to me.
We can't stop here, this is bat country. Hunter S Thompson RIP.
User avatar
pk_fox
LXF regular
 
Posts: 292
Joined: Wed Apr 13, 2005 1:38 pm
Location: Surrey, UK


Return to Other OS

Who is online

Users browsing this forum: No registered users and 1 guest