CLC-1220 Improvements in how we mark server as offline/online; add upgra...

...de routine to init.d script

This reduces duplication in marking the server on/offline. It also adds a one-function upgrade method to the init.d script.