equal
deleted
inserted
replaced
235 if config.debugmode: |
235 if config.debugmode: |
236 command.append('--debug') |
236 command.append('--debug') |
237 command.append('--loglevel %s' % config['log-threshold'].lower()) |
237 command.append('--loglevel %s' % config['log-threshold'].lower()) |
238 command.append(config.appid) |
238 command.append(config.appid) |
239 os.system(' '.join(command)) |
239 os.system(' '.join(command)) |
|
240 return 1 |
240 |
241 |
241 |
242 |
242 class RepositoryStopHandler(CommandHandler): |
243 class RepositoryStopHandler(CommandHandler): |
243 cmdname = 'stop' |
244 cmdname = 'stop' |
244 cfgname = 'repository' |
245 cfgname = 'repository' |
591 pidfile = config['pid-file'] |
592 pidfile = config['pid-file'] |
592 piddir = os.path.dirname(pidfile) |
593 piddir = os.path.dirname(pidfile) |
593 # go ! (don't daemonize in debug mode) |
594 # go ! (don't daemonize in debug mode) |
594 if not os.path.exists(piddir): |
595 if not os.path.exists(piddir): |
595 os.makedirs(piddir) |
596 os.makedirs(piddir) |
596 if not debug and daemonize(pidfile): |
597 if not debug and daemonize(pidfile, umask=config['umask']): |
597 return |
598 return |
598 uid = config['uid'] |
599 uid = config['uid'] |
599 if uid is not None: |
600 if uid is not None: |
600 try: |
601 try: |
601 uid = int(uid) |
602 uid = int(uid) |