Create Apple Script / Application to mount Network share and VPN
€8-30 EUR
Pagato alla consegna
Hello
I need a Script / Application that I can distribute to everyone in our company that does the following if possible:
Start the integrated VPN Client on Mac and establish connection
As soon as VPN connection is established, mount SMB Volume (specific IP)
When VPN connection is terminated, unmount SMB Volume.
If its not possible to start the vpn connection, we can also leave that part be and only mount the share.
If possible, it would be good if we don't have to include username and PW's in the script so I can distribute it without altering the script.
Is this possible?
We've elaborated on the following script. However it would need to be Login agnostic as this script only works when manualy clearing credentials in the account manager:
try
do shell script "ping -c 1 -t 1 192.168.1.8"
on error
-- we're not online, so connect the VPN
tell application "System Events"
tell current location of network preferences
set VPNservice to service "VPN (l2tp)"
connect VPNservice
end tell
end tell
delay 10
end try
try
mount volume "smb://192.168.1.8/"
end try
Rif. progetto: #15812987