I use an OSX Terminal session to start a VPN connection. The command that I execute at the prompt is:
/etc/netlock/cvc -c ::
This works as expected.
I would like to save this to a script file that I can simply double-click to start.
I created a file, 'vpn.command', added the command (list above), save it, and given execute permission:
chmod +x vpn.command
When I double-click the file, Terminal opens a BASH shell, executes the command, then exits. Upon closer inspection, the command is now '/etc/netlock/cvc -c ::; exit;'
Why is the extra '; exit;' appended to my command?
BTW, is there a way to execute another command, /etc/netlock/cvc -d, when the Terminal session is being closed so I can close the VPN automatically?