Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Endpoint Security VPN FULL start/stop script for Mac OS X
# 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: ./
# 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
# To prevent Endpoint Security VPN from starting automatically whenever you restart your Mac, edit this file:
# `/Library/LaunchAgents/com.checkpoint.eps.gui.plist`
# And change the values of `RunAtLoad` and `KeepAlive` to `false`
# [Source](
if pgrep $SERVICE > /dev/null
# $SERVICE is running. Shut it down
[ -f /Library/LaunchDaemons/com.checkpoint.epc.service.plist ] && sudo launchctl unload /Library/LaunchDaemons/com.checkpoint.epc.service.plist
[ -d /Library/Extensions/cpfw.kext ] && sudo kextunload /Library/Extensions/cpfw.kext
[ -d '/Applications/Check Point' ] && open -W -n -a '/Applications/Check Point' --args --disable
killall $SERVICE
# $SERVICE is not running. Fire it up
[ -f /Library/LaunchDaemons/com.checkpoint.epc.service.plist ] && sudo launchctl load /Library/LaunchDaemons/com.checkpoint.epc.service.plist
[ -d /Library/Extensions/cpfw.kext ] && sudo kextload /Library/Extensions/cpfw.kext
[ -d '/Applications/Check Point' ] && open -W -n -a '/Applications/Check Point' --args --enable
[ -d '/Applications/Endpoint Security' ] && open '/Applications/Endpoint Security'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment