1717
1818"""Command-line script that runs a server over roundup.cgi.client.
1919
20- $Id: roundup_server.py,v 1.69 2004-10-29 20:39:31 a1s Exp $
20+ $Id: roundup_server.py,v 1.70 2004-10-30 08:23:51 a1s Exp $
2121"""
2222__docformat__ = 'restructuredtext'
2323
@@ -430,7 +430,7 @@ class SvcShutdown(Exception):
430430
431431 class RoundupService (win32serviceutil .ServiceFramework ):
432432
433- _svc_name_ = "Roundup Bug Tracker "
433+ _svc_name_ = "roundup "
434434 _svc_display_name_ = "Roundup Bug Tracker"
435435
436436 running = 0
@@ -476,11 +476,9 @@ def usage(message=''):
476476 os_part = \
477477"" ''' -c <Command> Windows Service options.
478478 If you want to run the server as a Windows Service, you
479- must configure the rest of the options by changing the
480- constants of this program. You will at least configure
481- one tracker in the TRACKER_HOMES variable. This option
482- is mutually exclusive from the rest. Typing
483- "roundup-server -c help" shows Windows Services
479+ must use configuration file to specify tracker homes.
480+ Logfile option is required to run Roundup Tracker service.
481+ Typing "roundup-server -c help" shows Windows Services
484482 specifics.'''
485483 else :
486484 os_part = "" ''' -u <UID> runs the Roundup web server as this UID
@@ -494,24 +492,42 @@ def usage(message=''):
494492 print _ ('''%(message)sUsage: roundup-server [options] [name=tracker home]*
495493
496494Options:
497- -v prints the Roundup version number and exits
498- -C <fname> use configuration file
499- -n <name> sets the host name of the Roundup web server instance
500- -p <port> sets the port to listen on (default: %(port)s)
495+ -v print the Roundup version number and exit
496+ -h print this text and exit
497+ -S create or update configuration file and exit
498+ -C <fname> use configuration file <fname>
499+ -n <name> set the host name of the Roundup web server instance
500+ -p <port> set the port to listen on (default: %(port)s)
501501 -l <fname> log to the file indicated by fname instead of stderr/stdout
502502 -N log client machine names instead of IP addresses (much slower)
503503%(os_part)s
504504
505+ Long options:
506+ --version print the Roundup version number and exit
507+ --help print this text and exit
508+ --save-config create or update configuration file and exit
509+ --config <fname> use configuration file <fname>
510+ All settings of the [main] section of the configuration file
511+ also may be specified in form --<name>=<value>
512+
505513Examples:
514+
515+ roundup-server -S -C /opt/roundup/etc/roundup-server.ini \\
516+ -n localhost -p 8917 -l /var/log/roundup.log \\
517+ support=/var/spool/roundup-trackers/support
518+
506519 roundup-server -C /opt/roundup/etc/roundup-server.ini
507520
508521 roundup-server support=/var/spool/roundup-trackers/support
509522
510523 roundup-server -d /var/run/roundup.pid -l /var/log/roundup.log \\
511- support=/var/spool/roundup-trackers/support
524+ support=/var/spool/roundup-trackers/support
512525
513526Configuration file format:
514- See the "admin_guide" in the Roundup "doc" directory.
527+ Roundup Server configuration file has common .ini file format.
528+ Configuration file created with 'roundup-server -S' contains
529+ detailed explanations for each option. Please see that file
530+ for option descriptions.
515531
516532How to use "name=tracker home":
517533 These arguments set the tracker home(s) to use. The name is how the
@@ -582,7 +598,7 @@ def run(port=undefined, success_message=None):
582598 # if running in windows service mode, don't do any other stuff
583599 if ("-c" , "" ) in optlist :
584600 # acquire command line options recognized by service
585- short_options = "c:C :"
601+ short_options = "cC :"
586602 long_options = ["config" ]
587603 for (long_name , short_name ) in config .OPTIONS .items ():
588604 short_options += short_name
0 commit comments