Code: Select all
script-security 2
up /system/xbin/mymount.sh
Code: Select all
script-security 2
up /system/xbin/mymount.sh
Hi and thanks, I find that strange ( up scripts executing before the VPN is available ) , my script is indeed trying to use the VPN's ip address to mount a CIFS share so that explains why it fails ( no error message though it just doesn't work ) any idea how I can mount a share after the VPN comes up ?debbie10t wrote:Check your log for errors when running the script.
Note: up scripts are executed before the VPN is available, so if your script is trying to use the VPN it will fail.
I see thanks, that means I've got to set up a FileSystemWatcher for Windows clients and something similar for Android and Linux clients what a bummer, all I want to do is mount a share that may or may not be exposed by the VPN - thanks again.debbie10t wrote:By design, OpenVPN up script does not allow this as it is considered to be a security issue. However, forking a process has proven suitable for some users.pkfox wrote:any idea how I can mount a share after the VPN comes up ?
The way I do this is to use a File Monitor service which watches for a local file created by the up script. The Monitor process then launches processes independently of OpenVPN.
Ok that's useful to know thanks - how do I make a shortcut permanent ?debbie10t wrote:For windows you can create a shortcut to your network share and make it permanent, when the VPN becomes available windows will automatically connect to it. Sorry I can't help with android .. perhaps there is something similar.