comparison roundup/scripts/roundup_server.py @ 1736:c376d6c2da1a

logfile must be specified if pidfile is [SF#772820]
author Richard Jones <richard@users.sourceforge.net>
date Tue, 12 Aug 2003 01:14:11 +0000
parents 141d5a0869fa
children d51cb5225d4a a1e38322bd19
comparison
equal deleted inserted replaced
1735:141d5a0869fa 1736:c376d6c2da1a
14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 14 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
16 # 16 #
17 """ HTTP Server that serves roundup. 17 """ HTTP Server that serves roundup.
18 18
19 $Id: roundup_server.py,v 1.25 2003-08-12 01:11:43 richard Exp $ 19 $Id: roundup_server.py,v 1.26 2003-08-12 01:14:11 richard Exp $
20 """ 20 """
21 21
22 # python version check 22 # python version check
23 from roundup import version_check 23 from roundup import version_check
24 24
314 -n: sets the host name 314 -n: sets the host name
315 -p: sets the port to listen on 315 -p: sets the port to listen on
316 -l: sets a filename to log to (instead of stdout) 316 -l: sets a filename to log to (instead of stdout)
317 -d: run the server in the background and on UN*X write the server's PID 317 -d: run the server in the background and on UN*X write the server's PID
318 to the nominated file. Note: on Windows the PID argument is needed, 318 to the nominated file. Note: on Windows the PID argument is needed,
319 but ignored. 319 but ignored. The -l option *must* be specified if this option is.
320 -N: log client machine names in access log instead of IP addresses (much 320 -N: log client machine names in access log instead of IP addresses (much
321 slower) 321 slower)
322 322
323 name=tracker home: 323 name=tracker home:
324 Sets the tracker home(s) to use. The name is how the tracker is 324 Sets the tracker home(s) to use. The name is how the tracker is
402 elif opt == '-u': user = arg 402 elif opt == '-u': user = arg
403 elif opt == '-d': pidfile = abspath(arg) 403 elif opt == '-d': pidfile = abspath(arg)
404 elif opt == '-l': logfile = abspath(arg) 404 elif opt == '-l': logfile = abspath(arg)
405 elif opt == '-h': usage() 405 elif opt == '-h': usage()
406 elif opt == '-N': RoundupRequestHandler.LOG_IPADDRESS = 0 406 elif opt == '-N': RoundupRequestHandler.LOG_IPADDRESS = 0
407
408 if pidfile and not logfile:
409 raise ValueError, _("logfile *must* be specified if pidfile is")
407 410
408 if hasattr(os, 'getuid'): 411 if hasattr(os, 'getuid'):
409 # if root, setuid to the running user 412 # if root, setuid to the running user
410 if not os.getuid() and user is not None: 413 if not os.getuid() and user is not None:
411 try: 414 try:

Roundup Issue Tracker: http://roundup-tracker.org/