Created
October 1, 2025 06:00
-
-
Save 134130/37b6ad7061b6ae3610b483dbc159c3a2 to your computer and use it in GitHub Desktop.
Simple script that starts and stops Zscaler on Mac OSX
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
| #!/usr/bin/env bash | |
| case $# in | |
| 0) | |
| echo >&2 "Usage: $0 {start|stop}" | |
| exit 1 | |
| ;; | |
| 1) | |
| case $1 in | |
| start) | |
| echo >&2 "Starting Zscaler..." | |
| sudo sh -c "launchctl load /Library/LaunchDaemons/com.zscaler.service.plist && launchctl load /Library/LaunchDaemons/com.zscaler.tunnel.plist" | |
| ;; | |
| stop) | |
| sudo sh -c "launchctl unload /Library/LaunchDaemons/com.zscaler.service.plist && launchctl unload /Library/LaunchDaemons/com.zscaler.tunnel.plist" | |
| ;; | |
| *) | |
| echo >&2 "'$1' is not a valid verb." | |
| echo >&2 "Usage: $0 {start|stop}" | |
| exit 2 | |
| ;; | |
| esac | |
| ;; | |
| *) | |
| echo >&2 "Too many args provided ($#)." | |
| echo >&2 "Usage: $0 {start|stop}" | |
| exit 3 | |
| ;; | |
| esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment