comparison roundup/scripts/roundup_server.py @ 2484:200eb6e20351 maint-0.7

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Mon, 21 Jun 2004 04:56:34 +0000
parents a15f91a10e45
children 9e1c4c932323
comparison
equal deleted inserted replaced
2482:a15f91a10e45 2484:200eb6e20351
15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 15 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
16 # 16 #
17 17
18 """Command-line script that runs a server over roundup.cgi.client. 18 """Command-line script that runs a server over roundup.cgi.client.
19 19
20 $Id: roundup_server.py,v 1.46.2.3 2004-06-21 04:34:58 richard Exp $ 20 $Id: roundup_server.py,v 1.46.2.4 2004-06-21 04:56:34 richard Exp $
21 """ 21 """
22 __docformat__ = 'restructuredtext' 22 __docformat__ = 'restructuredtext'
23 23
24 # python version check 24 # python version check
25 from roundup import version_check 25 from roundup import version_check
341 break 341 break
342 return rv 342 return rv
343 343
344 def usage(message=''): 344 def usage(message=''):
345 if RoundupService: 345 if RoundupService:
346 win = ''' -c: Windows Service options. If you want to run the server as a Windows 346 os_part = \
347 Service, you must configure the rest of the options by changing the 347 ""''' -c <Command> Windows Service options.
348 constants of this program. You will at least configure one tracker 348 If you want to run the server as a Windows Service, you must
349 in the TRACKER_HOMES variable. This option is mutually exclusive 349 configure the rest of the options by changing the constants
350 from the rest. Typing "roundup-server -c help" shows Windows 350 of this program. You will at least configure one tracker in
351 Services specifics.''' 351 the TRACKER_HOMES variable. This option is mutually exclusive
352 from the rest. Typing "roundup-server -c help" shows Windows
353 Services specifics.'''
352 else: 354 else:
353 win = '' 355 os_part = ''' -u <UID> runs the Roundup web server as this UID
356 -g <GID> runs the Roundup web server as this GID
357 -d <PIDfile> run the server in the background and write the server's PID
358 to the file indicated by PIDfile. The -l option *must* be
359 specified if -d is used.'''
354 port=PORT 360 port=PORT
355 print _('''%(message)s 361 if message:
356 Usage: 362 message += '\n'
357 roundup-server [options] [name=tracker home]* 363 print _('''%(message)sUsage: roundup-server [options] [name=tracker home]*
358 364
359 options: 365 Options:
360 -v: print version and exit 366 -v prints the Roundup version number and exits
361 -n: sets the host name 367 -n <name> sets the host name of the Roundup web server instance
362 -p: sets the port to listen on (default: %(port)s) 368 -p <port> sets the port to listen on (default: %(port)s)
363 -u: sets the uid to this user after listening on the port 369 -l <fname> log to the file indicated by fname instead of stderr/stdout
364 -g: sets the gid to this group after listening on the port 370 -N log client machine names instead of IP addresses (much slower)
365 -l: sets a filename to log to (instead of stderr / stdout) 371 %(os_part)s
366 -d: run the server in the background and on UN*X write the server's PID 372
367 to the nominated file. The -l option *must* be specified if this 373 Examples:
368 option is. 374 roundup-server support=/var/spool/roundup-trackers/support
369 -N: log client machine names in access log instead of IP addresses (much 375
370 slower) 376 roundup-server -d /var/run/roundup.pid -l /var/log/roundup.log \\
371 %(win)s 377 support=/var/spool/roundup-trackers/support
372 378
373 name=tracker home: 379 How to use "name=tracker home":
374 Sets the tracker home(s) to use. The name is how the tracker is 380 These arguments set the tracker home(s) to use. The name is how the
375 identified in the URL (it's the first part of the URL path). The 381 tracker is identified in the URL (it's the first part of the URL path).
376 tracker home is the directory that was identified when you did 382 The tracker home is the directory that was identified when you did
377 "roundup-admin init". You may specify any number of these name=home 383 "roundup-admin init". You may specify any number of these name=home
378 pairs on the command-line. For convenience, you may edit the 384 pairs on the command-line. For convenience, you may edit the
379 TRACKER_HOMES variable in the roundup-server file instead. 385 TRACKER_HOMES variable in the roundup-server file instead.
380 Make sure the name part doesn't include any url-unsafe characters like 386 Make sure the name part doesn't include any url-unsafe characters like
381 spaces, as these confuse the cookie handling in browsers like IE. 387 spaces, as these confuse the cookie handling in browsers like IE.

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