-
-
Save skrajewski/c09cd3550aa60b42d9638c13c1f9e02d to your computer and use it in GitHub Desktop.
Revisions
-
bhstahl revised this gist
Mar 21, 2017 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,7 +26,8 @@ $ vpn setup ```sh $ vpn start # Launching global protect $ vpn stop # Quitting global protect ``` -
bhstahl revised this gist
Mar 21, 2017 . No changes.There are no files selected for viewing
-
bhstahl revised this gist
Mar 21, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ $ mkdir ~/.bin 2. Download the `vpn` file above to that directory ```sh curl https://gist.github.com/bhstahl/a90d747683ea0598c673e42d7f5a8900/raw/75cf1751c315795619399ef0e6b53a0297af3040/vpn --output ~/.bin/vpn ``` 3. Make it executable by adding this to your `.bash_profile` -
bhstahl created this gist
Mar 21, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,32 @@ 1. Create a folder to hold your custom bash commands ```sh $ mkdir ~/.bin ``` 2. Download the `vpn` file above to that directory ```sh curl tobefilledin --output ~/.bin/vpn ``` 3. Make it executable by adding this to your `.bash_profile` ```sh export PATH="$PATH:~/.bin" ```` 4. Run the setup command to make sure global protect doesnt launch each time you use your computer ```sh $ vpn setup ``` 5. Then start/stop it on your own time ```sh $ vpn start Launching global protect $ vpn stop Quitting global protect ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,38 @@ #!/bin/bash function setup() { sudo mv /Library/LaunchDaemons/com.paloaltonetworks.gp.pangpsd.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/ sudo mv /Library/LaunchAgents/com.paloaltonetworks.gp.pangps.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/ sudo mv /Library/LaunchAgents/com.paloaltonetworks.gp.pangpa.plist /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/ } function up() { launchctl load /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/com.paloaltonetworks.gp.pangps.plist launchctl load /Library/Application\ Support/PaloAltoNetworks/GlobalProtect/com.paloaltonetworks.gp.pangpa.plist } function down() { launchctl remove com.paloaltonetworks.gp.pangps launchctl remove com.paloaltonetworks.gp.pangpa } case $1 in up) echo "Launching global protect" up ;; down) echo "Quitting global protect" down ;; setup) echo "Disabling global protect from startup items" setup ;; *) echo "'$1' is not a valid verb. The only valid verbs are 'up' and 'down'." exit 1 ;; esac