ARCv2
view release on metacpan or search on metacpan
lib/arcxd.pod view on Meta::CPAN
=head1 SYNOPSIS
This are some examples how to run the ARCv2 server.
=over 4
=item arcxd
Start the ARCv2 server. The server will listen on the DefaultPort and all local addresses.
It will read the configuration file, located in the ConfigPath. After successful listening,
it will fork into the background.
=item arcxd -p 1234
Same as L<arcxd> but listens on port 1234.
=item arcxd -d 5
Stay in foreground and log messages to stderr.
=item arcxd -P arcxd.pid
Let arcxd store the pid of the master process in arcxd.pid.
=back
=head1 USAGE
Some parameters can be supplied to this scripts. The most of them come from the configuration file.
By default arcxd fork itself into background. If you want to run arcx in the foreground set the -d option.
The scheme looks like this:
arcxd [-d <loglevel>] [-p <port>] [-F <config file>] [-v]
=head2 Parameter
=over 4
=item -d <loglevel>
Let the server put its log output to "stderr" and set the log level to <loglevel>. Also tells the server to do not fork into the background.
=item -p <port>
On which port the server shall listen on. (override the one from the configuration file and the default port). Change this for testing purposes.
=item -P <pid_file>
Where should the Net::Server store the PID of the master process.
=item -F <config file>
scripts/arcxd view on Meta::CPAN
my $prop = $def{server};
$prop->{port} = [split(/,/,$args{p} ? $args{p} : $cf->val("arcd","port",$Arc::DefaultPort))];
$prop->{host} = $cf->val("arcd","host",0);
$prop->{max_requests} = $cf->val("arcd","max_requests");
$prop->{min_servers} = $cf->val("arcd","min_servers");
$prop->{max_servers} = $cf->val("arcd","max_servers");
$prop->{max_spare_servers} = $cf->val("arcd","max_spare_servers");
$prop->{min_spare_servers} = $cf->val("arcd","min_spare_servers");
$prop->{pid_file} = $args{P} ? $args{P} : $cf->val("arcd","pid_file",$Arc::DefaultPIDFile);
$prop->{background} = $args{d} ? undef : 1;
unless (open(FH,">".$prop->{pid_file})) {
die "will not be able to create PID file ".$prop->{pid_file};
}
close(FH);
my $cmds = {};
foreach ($cf->Parameters("commands")) {
$cmds->{$_} = $cf->val("commands",$_);
verbout("adding possible command:",$_);
}
verbout("Available SASL mechanisms:",join(",",$cf->val("arcd","sasl_mechanisms")));
verbout("Loglevel:",$log{loglevel});
verbout("Logdest:",$log{logdestination});
verbout("Listenport:",join(",",@{$prop->{port}}));
verbout("Forking into background.") unless $args{d};
verbout("Using $Arc::Copyright.");
verbout("Contact: $Arc::Contact.");
verbout("Service: ",$cf->val("main","service"));
verbout("PID-file: ",$prop->{pid_file});
my $arc = new Arc::Server(
%def,
%log,
connection_vars => {
( run in 2.029 seconds using v1.01-cache-2.11-cpan-d8267643d1d )