|
17 | 17 |
|
18 | 18 | """Command-line script that runs a server over roundup.cgi.client. |
19 | 19 |
|
20 | | -$Id: roundup_server.py,v 1.86 2006-12-18 03:53:39 richard Exp $ |
| 20 | +$Id: roundup_server.py,v 1.87 2006-12-18 05:56:49 a1s Exp $ |
21 | 21 | """ |
22 | 22 | __docformat__ = 'restructuredtext' |
23 | 23 |
|
@@ -378,8 +378,8 @@ class ServerConfig(configuration.Config): |
378 | 378 | "In order to use this option, " |
379 | 379 | "the server must be run initially as root.\n" |
380 | 380 | "Availability: Unix."), |
381 | | - (configuration.BooleanOption, "nodaemon", "no", |
382 | | - "don't fork (this overrides the pidfile mechanism)'"), |
| 381 | + (configuration.BooleanOption, "nodaemon", "no", |
| 382 | + "don't fork (this overrides the pidfile mechanism)'"), |
383 | 383 | (configuration.BooleanOption, "log_hostnames", "no", |
384 | 384 | "Log client machine names instead of IP addresses " |
385 | 385 | "(much slower)"), |
@@ -645,9 +645,9 @@ def writepidfile(pidfile): |
645 | 645 | ''' Write a pidfile (only). Do not daemonize. ''' |
646 | 646 | pid = os.getpid() |
647 | 647 | if pid: |
648 | | - pidfile = open(pidfile, 'w') |
649 | | - pidfile.write(str(pid)) |
650 | | - pidfile.close() |
| 648 | + pidfile = open(pidfile, 'w') |
| 649 | + pidfile.write(str(pid)) |
| 650 | + pidfile.close() |
651 | 651 |
|
652 | 652 | def daemonize(pidfile): |
653 | 653 | ''' Turn this process into a daemon. |
@@ -774,10 +774,10 @@ def run(port=undefined, success_message=None): |
774 | 774 | " on this Operating System") |
775 | 775 | sys.exit(0) |
776 | 776 | else: |
777 | | - if config['NODAEMON']: |
778 | | - writepidfile(config["PIDFILE"]) |
779 | | - else: |
780 | | - daemonize(config["PIDFILE"]) |
| 777 | + if config['NODAEMON']: |
| 778 | + writepidfile(config["PIDFILE"]) |
| 779 | + else: |
| 780 | + daemonize(config["PIDFILE"]) |
781 | 781 |
|
782 | 782 | # create the server |
783 | 783 | httpd = config.get_server() |
|
0 commit comments