How to create a service on OSMC

This article in Wiki, might be what you are looking for:

Doing it in the MyOSMC is abit over my head. Else just ssh into your device and run “sudo systemctl start or stop [yourservicename]”

In my minecraft-server post here on the forum you got a service that starts and stops a script, almost at the bottom of first post.