I wrote a Java server that blocks spam based on my criteria and set it to run like this:
http://manpages.ubuntu.com/manpages/trusty/man8/update-rc.d....
I didn't do any daemonzing like we used to do in the C days so I'm not sure that the systemd approach mentioned in the article does it better (not against the idea, maybe it's needed on non-Ubuntu systems?).
I just needed to write a simple shell script with the basics and this:
...
case "$1" in
start)
startup
;;
stop)
shutdown
;;
restart)
restartit
;;
esac
...