sbt/sbt-native-packager — pull request #120 by dbathily (2014-01-04 19:15:13+00:00)
Title: Better upstart script

Add a stop stanzas (http://upstart.ubuntu.com/cookbook/#job-with-start-on-but-no-stop-on) and use start-stop-daemon as recommended in the upstart cookbook (http://upstart.ubuntu.com/cookbook/#changing-user)

Some server applications (like those builded with play framework) will not launch after a reboot/shutdown without a proper stop because they create a pid file and don't boot if this file exists. For those applications, a stop before system's shutdown is mandatory.

Also, for those applications, we can improve the script by adding a "pre start" Stanzas that will delete the pid file if it exist and if there haven't a running process with the corresponding id. That's why I think the feature #118 will be useful. Playframework will provide his upstart script.