1 2 3 4
#!/bin/sh ! /bin/launchctl list net.sourceforge.netatalk.afpd &>/dev/null || /bin/launchctl unload /System/Library/LaunchDaemons/net.sourceforge.netatalk.afpd.plist exit 0