1 2 3 4
#!/bin/sh ! /bin/launchctl list com.openssh.sshd &>/dev/null || /bin/launchctl unload /Library/LaunchDaemons/com.openssh.sshd.plist exit 0