hub: make restart of local hub more robust
hub: make restart of local hub more robust

DrXyzzy/smc,tscholl2/smc,DrXyzzy/smc,tscholl2/smc,tscholl2/smc,sagemathinc/smc,tscholl2/smc,tscholl2/smc,sagemathinc/smc,DrXyzzy/smc,sagemathinc/smc,sagemathinc/smc,DrXyzzy/smc