Install needed CPAN modules on first sympa installation.
This commit is contained in:
parent
a10a2f74c4
commit
f353cb4c3e
@ -62,6 +62,66 @@ _required_debian_packages="
|
|||||||
libsoap-lite-perl
|
libsoap-lite-perl
|
||||||
libcrypt-ciphersaber-perl
|
libcrypt-ciphersaber-perl
|
||||||
libmail-dkim-perl
|
libmail-dkim-perl
|
||||||
|
cpanminus
|
||||||
|
"
|
||||||
|
|
||||||
|
_needed_cpan_modules="
|
||||||
|
CPAN
|
||||||
|
Archive::Zip
|
||||||
|
CGI
|
||||||
|
Class::Singleton
|
||||||
|
DBD::mysql
|
||||||
|
DBI
|
||||||
|
DateTime::Format::Mail
|
||||||
|
DateTime::TimeZone
|
||||||
|
Digest::MD5
|
||||||
|
Encode
|
||||||
|
File::Copy::Recursive
|
||||||
|
File::NFSLock
|
||||||
|
File::Path
|
||||||
|
HTML::FormatText
|
||||||
|
HTML::StripScripts::Parser
|
||||||
|
HTML::TreeBuilder
|
||||||
|
IO::File
|
||||||
|
IO::Scalar
|
||||||
|
LWP::UserAgent
|
||||||
|
List::Util::XS
|
||||||
|
Locale::Messages
|
||||||
|
MHonArc::UTF8
|
||||||
|
MIME::Base64
|
||||||
|
MIME::Charset
|
||||||
|
MIME::EncWords
|
||||||
|
MIME::Lite::HTML
|
||||||
|
MIME::Tools
|
||||||
|
Mail::Address
|
||||||
|
Net::CIDR
|
||||||
|
Sys::Syslog
|
||||||
|
Template
|
||||||
|
Term::ProgressBar
|
||||||
|
Text::LineFold
|
||||||
|
Time::HiRes
|
||||||
|
URI::Escape
|
||||||
|
XML::LibXML
|
||||||
|
AuthCAS
|
||||||
|
CGI::Fast
|
||||||
|
Clone
|
||||||
|
Crypt::CipherSaber
|
||||||
|
Crypt::OpenSSL::X509
|
||||||
|
Crypt::SMIME
|
||||||
|
DBD::CSV
|
||||||
|
DBD::ODBC
|
||||||
|
DBD::Pg
|
||||||
|
DBD::SQLite
|
||||||
|
DBD::Sybase
|
||||||
|
Data::Password
|
||||||
|
Encode::Locale
|
||||||
|
FCGI
|
||||||
|
IO::Socket::SSL
|
||||||
|
Mail::DKIM::Verifier
|
||||||
|
Net::DNS
|
||||||
|
Net::LDAP
|
||||||
|
Net::SMTP
|
||||||
|
SOAP::Lite
|
||||||
"
|
"
|
||||||
#_required_debian_packages="
|
#_required_debian_packages="
|
||||||
# libcgi-pm-perl
|
# libcgi-pm-perl
|
||||||
@ -1536,14 +1596,14 @@ if ! $UPDATE_SYMPA ; then
|
|||||||
|
|
||||||
declare -a required_debian_packages_arr
|
declare -a required_debian_packages_arr
|
||||||
for _debian_pkg in $_required_debian_packages ; do
|
for _debian_pkg in $_required_debian_packages ; do
|
||||||
perl_modules_arr+=("$_debian_pkg")
|
required_debian_packages_arr+=("$_debian_pkg")
|
||||||
done
|
done
|
||||||
> ${_logdir}/debian-install.log
|
> ${_logdir}/debian-install.log
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "\tInstalling required debian packages .."
|
echo -e "\tInstalling required debian packages .."
|
||||||
|
|
||||||
for _debian_pkg in ${perl_modules_arr[@]} ; do
|
for _debian_pkg in ${required_debian_packages_arr@]} ; do
|
||||||
|
|
||||||
echononl "\t Installing $_debian_pkg .."
|
echononl "\t Installing $_debian_pkg .."
|
||||||
if ! dpkg -l $_debian_pkg 2> /dev/null | grep -e "^ii" > /dev/null 2>&1 ; then
|
if ! dpkg -l $_debian_pkg 2> /dev/null | grep -e "^ii" > /dev/null 2>&1 ; then
|
||||||
@ -1570,6 +1630,31 @@ if ! $UPDATE_SYMPA ; then
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## - Install reqired/optional perl modules
|
||||||
|
## -
|
||||||
|
|
||||||
|
declare -a cpan_modules_arr
|
||||||
|
for _module in $_needed_cpan_modules ; do
|
||||||
|
cpan_modules_arr+=("$_module")
|
||||||
|
done
|
||||||
|
> ${_logdir}/cp_modul-install.log
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo -e "\tInstalling cpan modules .."
|
||||||
|
|
||||||
|
for _cpan_module in ${cpan_modules_arr[@]} ; do
|
||||||
|
|
||||||
|
echononl "\t Installing $_cpan_module .."
|
||||||
|
cpanm -q --skip-installed $_module > "${_logdir}/cp_modul-install.log" 2>&1
|
||||||
|
if [[ "$?" -ne 0 ]] ; then
|
||||||
|
echo_failed
|
||||||
|
error "$(cat "${_logdir}/cp_modul-install.log")"
|
||||||
|
else
|
||||||
|
echo_ok
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
info "After Installation finished, check presens of required perl modules"
|
info "After Installation finished, check presens of required perl modules"
|
||||||
|
|
||||||
## - Generate some locales
|
## - Generate some locales
|
||||||
|
Loading…
Reference in New Issue
Block a user