You can use /sbin/service to start or stop the “Personal File Sharing”.
/sbin/service
Start the Apple File Server (“Personal File Sharing”):
sudo /sbin/service com.apple.AppleFileServer start
And likewise stop it:
sudo /sbin/service com.apple.AppleFileServer stop