systemd (opposed to upstart in earlier Ubuntu verions) additionally sends SIGHUP on shutdown (and waits 90s instead of 10s before sending SIGKILL). I suggest to ignore SIGHUP or to handle SIGTERM and SIGHUP the same (idempotent) way.
[source](https://askubuntu.com/questions/819730/no-sigterm-before-sigkill-shutdown-wi...)
I modified Geany to ignore SIGHUP, but when I sent SIGTERM geany opened a dialog asking if I really wanted to quit