diff --git a/example/example b/example/example index 9c00e5d..7ef42d0 100755 Binary files a/example/example and b/example/example differ diff --git a/service_linux.go b/service_linux.go index 26931e7..ad7cf72 100644 --- a/service_linux.go +++ b/service_linux.go @@ -342,10 +342,13 @@ case "$1" in esac exit 0` +// The upstart script should stop with an INT or the Go runtime will terminate +// the program before the Stop handler can run. const upstartScript = `# {{.Description}} description "{{.Display}}" +kill signal INT start on filesystem or runlevel [2345] stop on runlevel [!2345]