Просмотр исходного кода

vesta-softaculous for ubuntu installer

Serghey Rodin 8 лет назад
Родитель
Сommit
ca786aae4d
1 измененных файлов с 24 добавлено и 4 удалено
  1. 24 4
      install/vst-install-ubuntu.sh

+ 24 - 4
install/vst-install-ubuntu.sh

@@ -29,7 +29,8 @@ if [ "$release" = '16.04' ]; then
         mysql-client postgresql postgresql-contrib phppgadmin phpmyadmin mc
         mysql-client postgresql postgresql-contrib phppgadmin phpmyadmin mc
         flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
         flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
         e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
         e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
-        bsdmainutils cron vesta vesta-nginx vesta-php expect vim-common"
+        bsdmainutils cron vesta vesta-nginx vesta-php expect vim-common
+        vesta-ioncube vesta-softaculous"
 elif [ "$release" = '16.10' ]; then
 elif [ "$release" = '16.10' ]; then
     software="nginx apache2 apache2-utils apache2.2-common
     software="nginx apache2 apache2-utils apache2.2-common
         apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf
         apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf
@@ -41,7 +42,8 @@ elif [ "$release" = '16.10' ]; then
         mysql-client postgresql postgresql-contrib phppgadmin phpmyadmin mc
         mysql-client postgresql postgresql-contrib phppgadmin phpmyadmin mc
         flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
         flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
         e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
         e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
-        bsdmainutils cron vesta vesta-nginx vesta-php expect vim-common"
+        bsdmainutils cron vesta vesta-nginx vesta-php expect vim-common
+        vesta-ioncube vesta-softaculous"
 else
 else
     software="nginx apache2 apache2-utils apache2.2-common
     software="nginx apache2 apache2-utils apache2.2-common
         apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf
         apache2-suexec-custom libapache2-mod-ruid2 libapache2-mod-rpaf
@@ -53,7 +55,8 @@ else
         mysql-client postgresql postgresql-contrib phppgadmin phpMyAdmin mc
         mysql-client postgresql postgresql-contrib phppgadmin phpMyAdmin mc
         flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
         flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
         e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
         e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
-        bsdmainutils cron vesta vesta-nginx vesta-php expect vim-common"
+        bsdmainutils cron vesta vesta-nginx vesta-php expect vim-common
+        vesta-ioncube vesta-softaculous"
 fi
 fi
 
 
 # Defining help function
 # Defining help function
@@ -74,6 +77,7 @@ help() {
   -t, --spamassassin      Install SpamAssassin  [yes|no]  default: yes
   -t, --spamassassin      Install SpamAssassin  [yes|no]  default: yes
   -i, --iptables          Install Iptables      [yes|no]  default: yes
   -i, --iptables          Install Iptables      [yes|no]  default: yes
   -b, --fail2ban          Install Fail2ban      [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
   -q, --quota             Filesystem Quota      [yes|no]  default: no
   -l, --lang              Default language                default: en
   -l, --lang              Default language                default: en
   -y, --interactive       Interactive install   [yes|no]  default: yes
   -y, --interactive       Interactive install   [yes|no]  default: yes
@@ -160,6 +164,7 @@ for arg; do
         --spamassassin)         args="${args}-t " ;;
         --spamassassin)         args="${args}-t " ;;
         --iptables)             args="${args}-i " ;;
         --iptables)             args="${args}-i " ;;
         --fail2ban)             args="${args}-b " ;;
         --fail2ban)             args="${args}-b " ;;
+        --softaculous)          args="${args}-o " ;;
         --remi)                 args="${args}-r " ;;
         --remi)                 args="${args}-r " ;;
         --quota)                args="${args}-q " ;;
         --quota)                args="${args}-q " ;;
         --lang)                 args="${args}-l " ;;
         --lang)                 args="${args}-l " ;;
@@ -176,7 +181,7 @@ done
 eval set -- "$args"
 eval set -- "$args"
 
 
 # Parsing arguments
 # 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
     case $Option in
         a) apache=$OPTARG ;;            # Apache
         a) apache=$OPTARG ;;            # Apache
         n) nginx=$OPTARG ;;             # Nginx
         n) nginx=$OPTARG ;;             # Nginx
@@ -194,6 +199,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
         i) iptables=$OPTARG ;;          # Iptables
         b) fail2ban=$OPTARG ;;          # Fail2ban
         b) fail2ban=$OPTARG ;;          # Fail2ban
         r) remi=$OPTARG ;;              # Remi repo
         r) remi=$OPTARG ;;              # Remi repo
+        o) softaculous=$OPTARG ;;       # Softaculous plugin
         q) quota=$OPTARG ;;             # FS Quota
         q) quota=$OPTARG ;;             # FS Quota
         l) lang=$OPTARG ;;              # Language
         l) lang=$OPTARG ;;              # Language
         y) interactive=$OPTARG ;;       # Interactive install
         y) interactive=$OPTARG ;;       # Interactive install
@@ -227,6 +233,7 @@ else
 fi
 fi
 set_default_value 'iptables' 'yes'
 set_default_value 'iptables' 'yes'
 set_default_value 'fail2ban' 'yes'
 set_default_value 'fail2ban' 'yes'
+set_default_value 'softaculous' 'yes'
 set_default_value 'quota' 'no'
 set_default_value 'quota' 'no'
 set_default_value 'interactive' 'yes'
 set_default_value 'interactive' 'yes'
 set_default_lang 'en'
 set_default_lang 'en'
@@ -370,6 +377,11 @@ if [ "$proftpd" = 'yes' ]; then
     echo '   - ProFTPD FTP Server'
     echo '   - ProFTPD FTP Server'
 fi
 fi
 
 
+# Softaculous
+if [ "$softaculous" = 'yes' ]; then
+    echo -n '   - Softaculous Plugin'
+fi
+
 # Firewall stack
 # Firewall stack
 if [ "$iptables" = 'yes' ]; then
 if [ "$iptables" = 'yes' ]; then
     echo -n '   - Iptables Firewall'
     echo -n '   - Iptables Firewall'
@@ -620,6 +632,9 @@ if [ "$postgresql" = 'no' ]; then
     software=$(echo "$software" | sed -e 's/php-pgsql//')
     software=$(echo "$software" | sed -e 's/php-pgsql//')
     software=$(echo "$software" | sed -e 's/phppgadmin//')
     software=$(echo "$software" | sed -e 's/phppgadmin//')
 fi
 fi
+if [ "$softaculous" = 'no' ]; then
+    software=$(echo "$software" | sed -e 's/vesta-softaculous//')
+fi
 if [ "$iptables" = 'no' ] || [ "$fail2ban" = 'no' ]; then
 if [ "$iptables" = 'no' ] || [ "$fail2ban" = 'no' ]; then
     software=$(echo "$software" | sed -e 's/fail2ban//')
     software=$(echo "$software" | sed -e 's/fail2ban//')
 fi
 fi
@@ -1273,6 +1288,11 @@ if [ "$quota" = 'yes' ]; then
     $VESTA/bin/v-add-sys-quota
     $VESTA/bin/v-add-sys-quota
 fi
 fi
 
 
+# Enabling softaculous plugin
+if [ "$softaculous" = 'yes' ]; then
+    $VESTA/bin/v-add-vesta-softaculous
+fi
+
 # Starting Vesta service
 # Starting Vesta service
 update-rc.d vesta defaults
 update-rc.d vesta defaults
 service vesta start
 service vesta start