Launchpad automatic translations update.
[odoo/odoo.git] / openerp-server
index dbae1c3..9303ed6 100755 (executable)
@@ -215,7 +215,7 @@ def quit_on_signals():
         os.unlink(config['pidfile'])
     logger = logging.getLogger('server')
     logger.info("Initiating shutdown")
-    logger.info("Hit CTRL-C again or send a second signal to force the sutdown.")
+    logger.info("Hit CTRL-C again or send a second signal to force the shutdown.")
     logging.shutdown()
 
     # manually join() all threads before calling sys.exit() to allow a second signal
@@ -240,6 +240,8 @@ if __name__ == "__main__":
 
     config = openerp.tools.config
 
+    setup_signal_handlers()
+
     if config["test_file"]:
         run_test_file(config['db_name'], config['test_file'])
         sys.exit(0)
@@ -265,7 +267,6 @@ if __name__ == "__main__":
         sys.exit(0)
 
     setup_pid_file()
-    setup_signal_handlers()
     logger = logging.getLogger('server')
     logger.info('OpenERP server is running, waiting for connections...')
     quit_on_signals()