Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- #
- # The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
- # which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
- # from time to time
- # Usage: checkpoint.sh
- # The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up.
- # Or, make an Automator action and paste the script.
- # You will need sudo power, of course
- #
- SERVICE='Endpoint_Security_VPN'
- if ps ax | grep -v grep | grep $SERVICE > /dev/null
- then
- # $SERVICE is running. Shut it down.
- killall $SERVICE
- osascript -e 'do shell script "sudo launchctl unload /Library/LaunchDaemons/com.checkpoint.epc.service.plist && sudo kextunload /System/Library/Extensions/cpfw.kext" with administrator privileges'
- else
- # $SERVICE is not running. Fire it up.
- osascript -e 'do shell script "sudo launchctl load /Library/LaunchDaemons/com.checkpoint.epc.service.plist && sudo kextload /System/Library/Extensions/cpfw.kext" with administrator privileges'
- /Applications/Endpoint\ Security\ VPN.app/Contents/MacOS/Endpoint_Security_VPN 2>1 > /dev/null &
- fi
Add Comment
Please, Sign In to add comment