salve o seguinte AppleScript em gfw.scpt
tell application "System Events"
tell current location of network preferences
set VPNservice to service "The Great Fire Wall" -- name of the VPN service
if exists VPNservice then connect VPNservice
set isConnected to connected of current configuration of VPNservice
if isConnected then
--- do something or nothing
end if
end tell
end tell
use osoftware gfw.scpt para iniciá-lo no terminal.