Skip to content

Instantly share code, notes, and snippets.

@mhberger
Forked from bubenkoff/checkpoint.sh
Last active December 27, 2015 16:09
Show Gist options
  • Save mhberger/7352348 to your computer and use it in GitHub Desktop.
Save mhberger/7352348 to your computer and use it in GitHub Desktop.
#!/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 load|unload
# You will need sudo power, of course
#
COMMAND=$1
if [ -z "$COMMAND" ] ; then echo "usage $0 unload|load" ; exit; fi
if [[ "$COMMAND" != "unload" && "$COMMAND" != "load" ]] ; then echo "usage $0 unload|load" ; exit; fi
if [ $COMMAND == "unload" ]
then
killall Endpoint_Security_VPN
killall TrGui
killall TrGUI;
fi
sudo launchctl $COMMAND /Library/LaunchDaemons/com.checkpoint.epc.service.plist && sudo kext$COMMAND /System/Library/Extensions/cpfw.kext
if [ $COMMAND == 'load' ]
then
/Applications/Endpoint\ Security\ VPN.app/Contents/MacOS/Endpoint_Security_VPN &>/dev/null &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment