-
Notifications
You must be signed in to change notification settings - Fork 118
/
imscp-autoinstall
executable file
·86 lines (65 loc) · 2.15 KB
/
imscp-autoinstall
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/perl
=head1 NAME
iMSCP::Debug - Debug library
=cut
# i-MSCP - internet Multi Server Control Panel
# Copyright (C) 2010-2019 by Laurent Declercq <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
=head1 NAME
imscp-autoinstall Install/Update/Reconfigure i-MSCP
=head1 SYNOPSIS
imscp-autoinstall [OPTION]...
=cut
use strict;
use warnings;
use FindBin;
use lib $FindBin::Bin, "$FindBin::Bin/engine/PerlLib", "$FindBin::Bin/engine/PerlVendor";
use autoinstaller::Functions qw/ loadConfig install /;
use File::Basename 'basename';
use iMSCP::Boolean;
use iMSCP::Debug qw/ newDebug output setDebug setVerbose /;
use iMSCP::Requirements;
use iMSCP::Dialog;
use iMSCP::Getopt;
use POSIX 'locale_h';
@{ENV}{qw/ LANG PATH IMSCP_SETUP /} = (
'C.UTF-8',
'/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
TRUE
);
delete $ENV{'LANGUAGE'};
setlocale( LC_MESSAGES, 'C.UTF-8' );
system( 'clear' );
iMSCP::Requirements->new()->user();
newDebug( 'imscp-autoinstall.log' );
{
no warnings 'once';
$::execmode = 'setup';
%::questions = ();
}
iMSCP::Getopt->parse( sprintf( 'Usage: perl %s [OPTION]...', basename( $0 )) . qq{
-s, --skip-dist-packages Do not install distribution packages.},
'--skip-dist-packages|s' => \&iMSCP::Getopt::skipDistPackages
);
setDebug( iMSCP::Getopt->debug );
setVerbose( iMSCP::Getopt->noprompt && iMSCP::Getopt->verbose );
loadConfig();
exit install();
=head1 AUTHOR
Laurent Declercq <[email protected]>
=cut
1;
__END__