I have an odd problem with a 2014 Mac Mini I use mostly as a headless file server. It's on Mojave, but it's done this through every installed OS. On occasion it needs rebooting and even restarts itself for whatever error. The problem is it turns off file sharing every time it starts back up. Screen sharing and printer sharing stay on. Its only the file sharing that's unchecked every single time. It's a pain to have to login to it from another computer and retick this, especially when the machine restarts itself and I don't know why it's disappeared from the network. Any way to make it stop?