Create Apple Script / Application to mount Network share and VPN

Cancelled Posted 6 years ago Paid on delivery
Cancelled Paid on delivery

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

Mac OS Network Administration Shell Script

Project ID: #15812987

About the project

1 proposal Remote project Active 6 years ago

1 freelancer is bidding on average €29 for this job

moorthy978

A proposal has not yet been provided

€29 EUR in 5 days
(2 Reviews)
1.8