equal
deleted
inserted
replaced
537 logger.info('Forcing debug mode on win32 platform') |
537 logger.info('Forcing debug mode on win32 platform') |
538 self.config.debug = True |
538 self.config.debug = True |
539 debug = self.config.debug |
539 debug = self.config.debug |
540 # create the server |
540 # create the server |
541 server = RepositoryServer(config, debug) |
541 server = RepositoryServer(config, debug) |
542 # go ! (don't daemonize in debug mode) |
|
543 pidfile = config['pid-file'] |
|
544 # ensure the directory where the pid-file should be set exists (for |
542 # ensure the directory where the pid-file should be set exists (for |
545 # instance /var/run/cubicweb may be deleted on computer restart) |
543 # instance /var/run/cubicweb may be deleted on computer restart) |
|
544 pidfile = config['pid-file'] |
546 piddir = os.path.dirname(pidfile) |
545 piddir = os.path.dirname(pidfile) |
|
546 # go ! (don't daemonize in debug mode) |
547 if not os.path.exists(piddir): |
547 if not os.path.exists(piddir): |
548 os.makedirs(piddir) |
548 os.makedirs(piddir) |
549 if not debug and daemonize(pidfile) == -1: |
549 if not debug and daemonize(pidfile): |
550 return |
550 return |
551 uid = config['uid'] |
551 uid = config['uid'] |
552 if uid is not None: |
552 if uid is not None: |
553 try: |
553 try: |
554 uid = int(uid) |
554 uid = int(uid) |