bin/kick-afp
#!/bin/bash
#
# I got tired of having to restart file sharing on my home server through
# the GUI
if [[ "$(uname -s)" != 'Darwin' ]]; then
echo 'Sorry, this script only works on macOS'
exit 1
fi
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.AppleFileServer.plist