Created
March 1, 2022 08:06
-
-
Save abdulhadad/773a5caf9bfa9d0e410c6f63ca745088 to your computer and use it in GitHub Desktop.
macOS zscaler start stop
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 characters
| #!/bin/sh | |
| # for admin user | |
| if [[ "$EUID" != 0 ]]; then | |
| sudo -k # next sudo, ask for password | |
| if sudo true; then | |
| echo "Password ok" | |
| else | |
| echo "Password error" | |
| exit 1 | |
| fi | |
| fi | |
| echo "Starting zscaler" | |
| sudo launchctl load -w /Library/LaunchDaemons/com.zscaler.tunnel.plist | |
| sudo launchctl load -w /Library/LaunchDaemons/com.zscaler.service.plist | |
| launchctl load -w /Library/LaunchAgents/com.zscaler.tray.plist | |
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 characters
| #!/bin/sh | |
| # for admin user | |
| if [[ "$EUID" != 0 ]]; then | |
| sudo -k # next sudo, ask for password | |
| if sudo true; then | |
| echo "Password ok" | |
| else | |
| echo "Password error" | |
| exit 1 | |
| fi | |
| fi | |
| echo "Stoping zscaler" | |
| launchctl unload -w /Library/LaunchAgents/com.zscaler.tray.plist | |
| sudo launchctl unload -w /Library/LaunchDaemons/com.zscaler.service.plist | |
| sudo launchctl unload -w /Library/LaunchDaemons/com.zscaler.tunnel.plist | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment