Revision 381 (by ahitrov, 2013/09/03 16:39:39) Plugins init
#!/usr/bin/perl

use strict;
use warnings "all";
use locale;

use FindBin;
BEGIN {
	require "$FindBin::RealBin/../lib/Modules.pm";
}

use Contenido::Globals;
use Contenido::Init;
use ErrorTee;
use PidFile;


# begin
Contenido::Init->init();

my $keeper_module = $state->project.'::Keeper';
$keeper = $keeper_module->new($state);

#PidFile->new($keeper, compat=>1);                # db-based locking (run only on one host)
#PidFile->new($keeper, compat=>1, per_host=>1);   # db-based locking (run on whole cluster)

for my $plugin ( split(/\s+/, $state->plugins) ) {
	my $class = $plugin.'::Apache';
	eval { $class->child_init(); };
	if ( $@ ) {
		$log->error("�� ���� ��������� ����� child_init ������� $plugin ($class) �� ������� '$@'");
	}
}
############################################
# please use:
#     $state->{log_dir} for logging
#     $state->{tmp_dir} for temporary files
###########################################