| 1 | package OPM::Installer::Utils::Linux; | ||
| 2 | |||
| 3 | # ABSTRACT: helper functions for ticketsystem addon installations on Linux | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | |||
| 8 | our $VERSION = '1.0.1'; # VERSION | ||
| 9 | |||
| 10 | use Moo::Role; | ||
| 11 | |||
| 12 | use File::Spec; | ||
| 13 | use File::Basename; | ||
| 14 | use List::Util qw(first); | ||
| 15 | use File::Glob qw(bsd_glob); | ||
| 16 | |||
| 17 | sub _find_path { | ||
| 18 | my ($self) = @_; | ||
| 19 | |||
| 20 | my @checks = qw(/opt/otrs /srv/otrs /etc/otrs); | ||
| 21 | my ($testdir) = grep { -d $_ }@checks; | ||
| 22 | |||
| 23 | return $testdir if $testdir; | ||
| 24 | |||
| 25 | # try to find apache installation and read from config | ||
| 26 | my ($apachedir) = grep{ -d $_ }qw(/etc/apache2 /etc/httpd); | ||
| 27 | return if !$apachedir; | ||
| 28 | |||
| 29 | |||
| 30 | } | ||
| 31 | |||
| 32 | 1; | ||
| 33 | |||
| 34 | __END__ |