mirror of
https://github.com/YunoHost-Apps/lutim_ynh.git
synced 2024-09-03 19:36:24 +02:00
24 lines
576 B
Perl
24 lines
576 B
Perl
package Mounter;
|
|
use Mojo::Base 'Mojolicious';
|
|
use FindBin qw($Bin);
|
|
use File::Spec qw(catfile);
|
|
|
|
# This method will run once at server start
|
|
sub startup {
|
|
my $self = shift;
|
|
|
|
push @{$self->commands->namespaces}, 'Lutim::Command';
|
|
|
|
my $config = $self->plugin('Config' =>
|
|
{
|
|
file => File::Spec->catfile($Bin, '..' ,'lutim.conf'),
|
|
default => {
|
|
url_sub_dir => '/'
|
|
}
|
|
}
|
|
);
|
|
|
|
$self->plugin('Mount' => {$config->{url_sub_dir} => File::Spec->catfile($Bin, '..', 'script', 'application')});
|
|
}
|
|
|
|
1;
|