6 Perlbal - Reverse-proxy load balancer and webserver
10 For now, see example configuration files in conf/ from the CPAN tarball
12 http://search.cpan.org/dist/Perlbal/
16 Brad Fitzpatrick, <brad@danga.com>
17 Mark Smith, <marksmith@danga.com>
21 http://www.danga.com/perlbal/
23 =head1 COPYRIGHT AND LICENSE
25 Copyright 2004, Danga Interactive, Inc.
26 Copyright 2005-2007, Six Apart, Ltd.
28 You can use and redistribute Perlbal under the same terms as Perl itself.
43 Getopt
::Long
::GetOptions
(
44 'daemon' => \
$opt_daemonize,
45 'config=s' => \
$opt_config,
47 'version' => \
$opt_version,
50 my $default_config = "/etc/perlbal/perlbal.conf";
51 $opt_config = $default_config if ! $opt_config && -e
$default_config;
53 usage
(0) if $opt_help;
59 --help This usage info
60 --version Print perlbal release version
61 --config=[file] Specify Perlbal config file
62 (default: /etc/perlbal/perlbal.conf)
70 print STDOUT
"Perlbal version $Perlbal::VERSION\n";
75 if ($opt_config && ! Perlbal
::load_config
($opt_config, sub { print STDOUT
"$_[0]\n"; })) {
76 die "Error starting up.\n";
79 # FIXME: warn harder if web_server services are enabled
80 if ($Perlbal::AIO_MODE
eq "none") {
81 print STDERR
"WARNING: AIO mode disabled or not available. \n".
82 " Perlbal will run slowly under load if you're doing any\n".
83 " disk operations. (e.g. web_server mode).\n".
84 " Install IO::AIO for better performance.\n";
87 unless (Perlbal
::Socket
->WatchedSockets() > 0) {
88 die "No services or management port configured. Nothing to do. Stopping.\n";
97 exit 0 if Perlbal
::run
();
103 # indent-tabs-mode: nil