Create Apple Script / Application to mount Network share and VPN

Cancellato Pubblicato 6 anni fa Pagato alla consegna
Cancellato 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

Mac OS Amministrazione Rete Script di Shell

Rif. progetto: #15812987

Info sul progetto

1 proposta Progetto a distanza Attivo 6 anni fa

1 freelance ha fatto un'offerta media di €29 per questo lavoro

moorthy978

A proposal has not yet been provided

€29 EUR in 5 giorni
(2 valutazioni)
1.8