add shutdown function after upgrade software