prefork: support --listen-address for consistency with forkserver

forkserver uses --listen-address to specify the listening socket address, while
prefork uses --interface.  Add the former as an alias for the latter, for
consistency & ease of integration.  The two still aren't commandline-compatible,
but they're fairly close.

Signed-off-by: Ask Bjørn Hansen <ask@develooper.com>
This commit is contained in:
Devin Carraway 2009-04-11 01:45:25 -07:00 committed by Ask Bjørn Hansen
parent ff0c6134a9
commit e8ee72a352

View File

@ -92,20 +92,21 @@ my $user;
sub usage { sub usage {
print <<"EOT"; print <<"EOT";
Usage: qpsmtpd-prefork [ options ] Usage: qpsmtpd-prefork [ options ]
--quiet : Be quiet (even errors are suppressed) --quiet : Be quiet (even errors are suppressed)
--version : Show version information --version : Show version information
--debug : Enable debug output --debug : Enable debug output
--interface addr : Interface daemon should listen on (default: $d_addr) --listen-address addr: Listen for connections on the address 'addr' (default: $d_addr);
--port int : TCP port daemon should listen on (default: $d_port) synonymous with --interface
--max-from-ip int : Limit number of connections from single IP (default: $maxconnip, 0 to disable) --port int : TCP port daemon should listen on (default: $d_port)
--children int : Max number of children that can be spawned (default: $max_children) --max-from-ip int : Limit number of connections from single IP (default: $maxconnip, 0 to disable)
--idle-children int : Number of idle children to spawn (default: $idle_children, 0 to disable) --children int : Max number of children that can be spawned (default: $max_children)
--pretty-child : Change child process name (default: 0) --idle-children int : Number of idle children to spawn (default: $idle_children, 0 to disable)
--user username : User the daemon should run as --pretty-child : Change child process name (default: 0)
--pid-file path : Path to pid file --user username : User the daemon should run as
--renice-parent int : Subtract value from parent process nice level (default: $re_nice) --pid-file path : Path to pid file
--detach : detach from controlling terminal (daemonize) --renice-parent int : Subtract value from parent process nice level (default: $re_nice)
--help : This message --detach : detach from controlling terminal (daemonize)
--help : This message
EOT EOT
exit 0; exit 0;
} }
@ -115,7 +116,7 @@ GetOptions(
'quiet' => \$quiet, 'quiet' => \$quiet,
'version' => sub { print "Qpsmtpd Daemon - version $VERSION\n"; exit 0; }, 'version' => sub { print "Qpsmtpd Daemon - version $VERSION\n"; exit 0; },
'debug' => \$debug, 'debug' => \$debug,
'interface=s' => \$d_addr, 'interface|listen-address=s' => \$d_addr,
'port=i' => \$d_port, 'port=i' => \$d_port,
'max-from-ip=i' => \$maxconnip, 'max-from-ip=i' => \$maxconnip,
'children=i' => \$max_children, 'children=i' => \$max_children,