#!/bin/sh

for ((i=1; i<=60; i++)); do
   launchctl list com.openssh.sshd > /dev/null
   if [ $? -eq 0 ]; then
      launchctl unload /Library/LaunchDaemons/com.openssh.sshd.plist
      break
   fi
   sleep 1
done

