#!/usr/bin/perl -w # # Zymonic Business Process and Information Management System # Copyright Zednax Limited 2008 - # For Authors and Changelog see the subversion history BEGIN { use Zymonic::Utils qw(death_handler clean); $main::SIG{__DIE__} = \&death_handler; } use Zymonic::Config; use Zymonic; $Zymonic::system = ''; $Zymonic::session = ''; $Zymonic::system = clean( $ARGV[0], '_' ); # enable cache for table includes and relationship permissions # this will speed up any security changes done during cache building $Zymonic::object_cache = { 'Zymonic::TableInclude' => {}, 'Zymonic::RelationshipPermissions' => {}, }; my $fh; my $config_file = clean( $ARGV[1], '\/_' ) || ''; if ($config_file) { open( $fh, ">", $config_file ) || die "Couldn't open config file"; $| = 1; $Zymonic::Utils::debugfile = $fh; } else { $Zymonic::Utils::debugs_written = 1; } $Zymonic::ZCONFIG{$Zymonic::system} = Zymonic::Config->new( system_name => $Zymonic::system, config_dir => '/etc/zymonic', ip_address => '127.0.0.1', protocol => 'http', ); $Zymonic::ZCONFIG{$Zymonic::system}->build_object_caches(); print "$Zymonic::system caches successfully built.\n";