1 package SL::System::Process;
5 use parent qw(Rose::Object);
7 use English qw(-no_match_vars);
12 my $dir = dirname(File::Spec->rel2abs($PROGRAM_NAME));
13 my $system_dir = File::Spec->catdir($dir, 'SL', 'System');
14 return $dir if -d $system_dir && -f File::Spec->catfile($system_dir, 'TaskServer.pm');
16 my @dirs = reverse File::Spec->splitdir($dir);
18 $dir = File::Spec->catdir(reverse @dirs);
19 $system_dir = File::Spec->catdir($dir, 'SL', 'System');
20 return File::Spec->curdir unless -d $system_dir && -f File::Spec->catfile($system_dir, 'TaskServer.pm');
34 SL::System::Process - assorted system-relevant functions
38 # Get base path to kivitendo scripts
39 my $path = SL::System::Process->exe_dir;
47 Returns the absolute path to the directory the kivitendo executables
48 (C<login.pl> etc.) and modules (sub-directory C<SL/> etc.) are located
59 Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>