def system_shutdown():
 logging.info('Performing system shutdown')
 Thread(target=halt).start()
 while __INITIALIZED__:
  time.sleep(1.0)
 if sabnzbd.WIN32:
  powersup.win_shutdown()
 elif DARWIN:
  powersup.osx_shutdown()
 else:
  powersup.linux_shutdown()

def system_shutdown ( ) : logging . info ( 'Performing system shutdown' ) Thread ( target = halt ) . start ( ) while __INITIALIZED__ : time . sleep ( 1.0 ) if sabnzbd . WIN32 : powersup . win_shutdown ( ) elif DARWIN : powersup . osx_shutdown ( ) else : powersup . linux_shutdown ( )
shutdown system after halting download and saving bookkeeping .