Skip to content

Instantly share code, notes, and snippets.

@jcf
Forked from bubenkoff/checkpoint.sh
Last active March 4, 2024 18:38
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcf/0f6ebff1727887ab40fd to your computer and use it in GitHub Desktop.
Save jcf/0f6ebff1727887ab40fd to your computer and use it in GitHub Desktop.
Endpoint Security VPN FULL start/stop script for Mac OS X
#!/bin/bash
# Toggle Checkpoint VPN firewall and VPN client
#
# http://git.io/vWAPU
set -e
APP='/Applications/Endpoint Security VPN.app'
KEXT='/System/Library/Extensions/cpfw.kext'
PLIST='/Library/LaunchDaemons/com.checkpoint.epc.service.plist'
SERVICE='com.checkpoint.epc.service'
UI_PROCESS_NAME='Endpoint_Security_VPN'
say () {
color="$1"
shift
echo -e "\033[$color;1m==>\033[0;1m $@\033[0m"
}
if sudo launchctl list "$SERVICE" &>/dev/null; then
say 31 "Tearing Checkpoint down..."
echo "Killing $UI_PROCESS_NAME..."
sudo killall "$UI_PROCESS_NAME" || true
echo "Unloading $PLIST..."
sudo launchctl unload "$PLIST"
echo "Unloading $KEXT..."
sudo kextunload "$KEXT"
else
say 32 "Bringing Checkpoint up..."
echo "Loading $PLIST..."
sudo launchctl load "$PLIST"
echo "Loading $KEXT..."
sudo kextload "$KEXT"
echo "Running $APP..."
open "$APP"
fi
@jcf
Copy link
Author

jcf commented Oct 29, 2015

Looks like this when you run it:

checkpoint-output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment