Skip to content

Instantly share code, notes, and snippets.

@kushal-r
Forked from kaleksandrov/global-protect.sh
Created August 20, 2019 17:51
Show Gist options
  • Select an option

  • Save kushal-r/96d9ea92aefe1f78adb463e0562b6a81 to your computer and use it in GitHub Desktop.

Select an option

Save kushal-r/96d9ea92aefe1f78adb463e0562b6a81 to your computer and use it in GitHub Desktop.

Revisions

  1. @kaleksandrov kaleksandrov renamed this gist Mar 26, 2017. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @kaleksandrov kaleksandrov created this gist May 5, 2016.
    34 changes: 34 additions & 0 deletions gp.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    #!/bin/bash

    case $# in
    0)
    echo "Usage: $0 {start|stop}"
    exit 1
    ;;
    1)
    case $1 in
    start)
    echo "Starting GlobalProtect..."
    launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist
    launchctl load /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist
    echo "Done!"
    ;;
    stop)
    echo "Stopping GlobalProtect..."
    launchctl remove com.paloaltonetworks.gp.pangps
    launchctl remove com.paloaltonetworks.gp.pangpa
    echo "Done!"
    ;;
    *)
    echo "'$1' is not a valid verb."
    echo "Usage: $0 {start|stop}"
    exit 2
    ;;
    esac
    ;;
    *)
    echo "Too many args provided ($#)."
    echo "Usage: $0 {start|stop}"
    exit 3
    ;;
    esac