Avoid checking updates when desktop is stopped

No need to run all the update machinery when there is no client
connected.

This commit also cleans up the stop handling a bit by moving it to
its own method.
2 files changed