Przeglądaj źródła

vesta-softaculous for rhel installer

Serghey Rodin 8 lat temu
rodzic
commit
08fafbcd85
1 zmienionych plików z 21 dodań i 3 usunięć
  1. 21 3
      install/vst-install-rhel.sh

+ 21 - 3
install/vst-install-rhel.sh

@@ -28,7 +28,7 @@ if [ "$release" -eq 7 ]; then
     openssh-clients ImageMagick curl mc screen ftp zip unzip flex sqlite pcre
     openssh-clients ImageMagick curl mc screen ftp zip unzip flex sqlite pcre
     sudo bc jwhois mailx lsof tar telnet rrdtool net-tools ntp GeoIP freetype
     sudo bc jwhois mailx lsof tar telnet rrdtool net-tools ntp GeoIP freetype
     fail2ban rsyslog iptables-services which vesta vesta-nginx vesta-php
     fail2ban rsyslog iptables-services which vesta vesta-nginx vesta-php
-    vim-common expect"
+    vim-common expect vesta-ioncube vesta-softaculous"
 else
 else
     software="nginx httpd mod_ssl mod_ruid2 mod_fcgid mod_extract_forwarded
     software="nginx httpd mod_ssl mod_ruid2 mod_fcgid mod_extract_forwarded
     php php-common php-cli php-bcmath php-gd php-imap php-mbstring php-mcrypt
     php php-common php-cli php-bcmath php-gd php-imap php-mbstring php-mcrypt
@@ -38,7 +38,8 @@ else
     postgresql-server postgresql-contrib phpPgAdmin e2fsprogs openssh-clients
     postgresql-server postgresql-contrib phpPgAdmin e2fsprogs openssh-clients
     ImageMagick curl mc screen ftp zip unzip flex sqlite pcre sudo bc jwhois
     ImageMagick curl mc screen ftp zip unzip flex sqlite pcre sudo bc jwhois
     mailx lsof tar telnet rrdtool net-tools ntp GeoIP freetype fail2ban
     mailx lsof tar telnet rrdtool net-tools ntp GeoIP freetype fail2ban
-    which vesta vesta-nginx vesta-php vim-common expect"
+    which vesta vesta-nginx vesta-php vim-common expect vesta-ioncube
+    vesta-softaculous"
 fi
 fi
 
 
 # Defining help function
 # Defining help function
@@ -60,6 +61,7 @@ help() {
   -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
   -r, --remi              Install Remi repo     [yes|no]  default: yes
   -r, --remi              Install Remi repo     [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
@@ -146,6 +148,7 @@ for arg; do
         --iptables)             args="${args}-i " ;;
         --iptables)             args="${args}-i " ;;
         --fail2ban)             args="${args}-b " ;;
         --fail2ban)             args="${args}-b " ;;
         --remi)                 args="${args}-r " ;;
         --remi)                 args="${args}-r " ;;
+        --softaculous)          args="${args}-o " ;;
         --quota)                args="${args}-q " ;;
         --quota)                args="${args}-q " ;;
         --lang)                 args="${args}-l " ;;
         --lang)                 args="${args}-l " ;;
         --interactive)          args="${args}-y " ;;
         --interactive)          args="${args}-y " ;;
@@ -161,7 +164,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
@@ -179,6 +182,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
@@ -213,6 +217,7 @@ fi
 set_default_value 'iptables' 'yes'
 set_default_value 'iptables' 'yes'
 set_default_value 'fail2ban' 'yes'
 set_default_value 'fail2ban' 'yes'
 set_default_value 'remi' 'yes'
 set_default_value 'remi' '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'
@@ -359,6 +364,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'
@@ -613,6 +623,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
@@ -1334,6 +1347,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
 chkconfig vesta on
 chkconfig vesta on
 service vesta start
 service vesta start