Just because it might be of interest to folks, I've finally gotten around to open sourcing the scripts we currently use on the FreeOP Servers to start / stop / otherwise manage the server both through the bot and through users logging on SSH.
You're welcome to make use of them on your own servers, I've used a variant on these since I was looking after CJFreedom and use them quite a bit for local servers when experimenting, and they're pretty good for what I need.
Repo Link - https://github.com/AtlasMediaGroup/TF-Scripts