server/serverctl.py
branchstable
changeset 5553 646737f80c88
parent 5424 8ecbcbff9777
child 5555 a64f48dd5fe4
child 5585 e1cbf6b304ea
--- a/server/serverctl.py	Thu May 20 10:55:33 2010 +0200
+++ b/server/serverctl.py	Thu May 20 20:45:21 2010 +0200
@@ -525,6 +525,7 @@
         )
 
     def run(self, args):
+        from logilab.common.daemon import daemonize
         from cubicweb.server.server import RepositoryServer
         appid = pop_arg(args, msg='No instance specified !')
         config = ServerConfiguration.config_for(appid)
@@ -544,7 +545,7 @@
         piddir = os.path.dirname(pidfile)
         if not os.path.exists(piddir):
             os.makedirs(piddir)
-        if not debug and server.daemonize(pidfile) == -1:
+        if not debug and daemonize(pidfile) == -1:
             return
         uid = config['uid']
         if uid is not None: