vesta-softaculous for debian installer

This commit is contained in:
Serghey Rodin 2017-12-29 13:37:43 +02:00
commit 62a8c4ec92

View file

@ -30,7 +30,7 @@ if [ "$release" -eq 8 ]; then
flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
bsdmainutils cron vesta vesta-nginx vesta-php expect libmail-dkim-perl
unrar-free vim-common"
unrar-free vim-common vesta-ioncube vesta-softaculous"
else
software="nginx apache2 apache2-utils apache2.2-common
apache2-suexec-custom libapache2-mod-ruid2
@ -43,7 +43,7 @@ else
flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
bsdmainutils cron vesta vesta-nginx vesta-php expect unrar-free
vim-common"
vim-common vesta-ioncube vesta-softaculous"
fi
# Defining help function
@ -64,6 +64,7 @@ help() {
-t, --spamassassin Install SpamAssassin [yes|no] default: yes
-i, --iptables Install Iptables [yes|no] default: yes
-b, --fail2ban Install Fail2ban [yes|no] default: yes
-o, --softaculous Install Softaculous [yes|no] default: yes
-q, --quota Filesystem Quota [yes|no] default: no
-l, --lang Default language default: en
-y, --interactive Interactive install [yes|no] default: yes
@ -151,6 +152,7 @@ for arg; do
--iptables) args="${args}-i " ;;
--fail2ban) args="${args}-b " ;;
--remi) args="${args}-r " ;;
--softaculous) args="${args}-o " ;;
--quota) args="${args}-q " ;;
--lang) args="${args}-l " ;;
--interactive) args="${args}-y " ;;
@ -166,7 +168,7 @@ done
eval set -- "$args"
# Parsing arguments
while getopts "a:n:w:v:j:k:m:g:d:x:z:c:t:i:b:r:q:l:y:s:e:p:fh" Option; do
while getopts "a:n:w:v:j:k:m:g:d:x:z:c:t:i:b:r:o:q:l:y:s:e:p:fh" Option; do
case $Option in
a) apache=$OPTARG ;; # Apache
n) nginx=$OPTARG ;; # Nginx
@ -184,6 +186,7 @@ while getopts "a:n:w:v:j:k:m:g:d:x:z:c:t:i:b:r:q:l:y:s:e:p:fh" Option; do
i) iptables=$OPTARG ;; # Iptables
b) fail2ban=$OPTARG ;; # Fail2ban
r) remi=$OPTARG ;; # Remi repo
o) softaculous=$OPTARG ;; # Softaculous plugin
q) quota=$OPTARG ;; # FS Quota
l) lang=$OPTARG ;; # Language
y) interactive=$OPTARG ;; # Interactive install
@ -217,6 +220,7 @@ else
fi
set_default_value 'iptables' 'yes'
set_default_value 'fail2ban' 'yes'
set_default_value 'softaculous' 'yes'
set_default_value 'quota' 'no'
set_default_value 'interactive' 'yes'
set_default_lang 'en'
@ -360,6 +364,11 @@ if [ "$proftpd" = 'yes' ]; then
echo ' - ProFTPD FTP Server'
fi
# Softaculous
if [ "$softaculous" = 'yes' ]; then
echo -n ' - Softaculous Plugin'
fi
# Firewall stack
if [ "$iptables" = 'yes' ]; then
echo -n ' - Iptables Firewall'
@ -592,6 +601,9 @@ if [ "$postgresql" = 'no' ]; then
software=$(echo "$software" | sed -e 's/php5-pgsql//')
software=$(echo "$software" | sed -e 's/phppgadmin//')
fi
if [ "$softaculous" = 'no' ]; then
software=$(echo "$software" | sed -e 's/vesta-softaculous//')
fi
if [ "$iptables" = 'no' ] || [ "$fail2ban" = 'no' ]; then
software=$(echo "$software" | sed -e 's/fail2ban//')
fi
@ -1294,6 +1306,11 @@ if [ "$quota" = 'yes' ]; then
$VESTA/bin/v-add-sys-quota
fi
# Enabling softaculous plugin
if [ "$softaculous" = 'yes' ]; then
$VESTA/bin/v-add-vesta-softaculous
fi
# Starting vesta service
update-rc.d vesta defaults
service vesta start