                         cb(err)
                 # MUST be here, since _restart_lock prevents _exec_on_local_hub!
                 @_restart_lock = true
-
-
         ], (err) =>
             winston.debug("local_hub restart: #{err}")
             @_restart_lock = false

                cb(false, @)

    restart: (cb) =>
        winston.debug("restarting a local hub")
        if @_restart_lock
            winston.debug("local hub restart -- hit a lock")
            cb("already restarting")

        if @_status.local_hub and @_status.sage_server and @_status.console_server
            cb()
        else
            # TODO: it would be better just to force start only the daemons that need to be started -- doing this is
            # just a first brutal minimum way to do this!
            winston.debug("Not all daemons are running -- restart required -- #{@username}@#{@host}")
            @_restart_local_hub_daemons (err) =>
                if err
                    cb(err)
