server/serverctl.py
changeset 5555 a64f48dd5fe4
parent 5442 3ed8afbbdf70
parent 5553 646737f80c88
child 5590 a56eb02f9ce7
--- a/server/serverctl.py	Tue May 18 18:18:08 2010 +0200
+++ b/server/serverctl.py	Thu May 20 20:47:13 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: