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

Bring back vesta default installer for merge.

Raphael Schneeberger 7 лет назад
Родитель
Сommit
0353d7f98b
1 измененных файлов с 85 добавлено и 85 удалено
  1. 85 85
      install/vst-install-debian.sh

+ 85 - 85
install/vst-install-debian.sh

@@ -1,14 +1,14 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Hestia Debian installer v.06
+# Vesta Debian installer v.05
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                  Variables&Functions                     #
 #                  Variables&Functions                     #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 export PATH=$PATH:/sbin
 export PATH=$PATH:/sbin
 export DEBIAN_FRONTEND=noninteractive
 export DEBIAN_FRONTEND=noninteractive
-RHOST='apt.hestiacp.com'
-CHOST='c.hestiacp.com'
+RHOST='apt.vestacp.com'
+CHOST='c.vestacp.com'
 VERSION='debian'
 VERSION='debian'
 VESTA='/usr/local/vesta'
 VESTA='/usr/local/vesta'
 memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
 memory=$(grep 'MemTotal' /proc/meminfo |tr ' ' '\n' |grep [0-9])
@@ -16,7 +16,7 @@ arch=$(uname -i)
 os='debian'
 os='debian'
 release=$(cat /etc/debian_version|grep -o [0-9]|head -n1)
 release=$(cat /etc/debian_version|grep -o [0-9]|head -n1)
 codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
 codename="$(cat /etc/os-release |grep VERSION= |cut -f 2 -d \(|cut -f 1 -d \))"
-vestacp="https://$CHOST/$VERSION/$release"
+vestacp="$VESTA/install/$VERSION/$release"
 
 
 if [ "$release" -eq 9 ]; then
 if [ "$release" -eq 9 ]; then
     software="nginx apache2 apache2-utils apache2-suexec-custom
     software="nginx apache2 apache2-utils apache2-suexec-custom
@@ -29,7 +29,7 @@ if [ "$release" -eq 9 ]; then
         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 libmail-dkim-perl
         bsdmainutils cron vesta vesta-nginx vesta-php expect libmail-dkim-perl
-        unrar-free vim-common net-tools"
+        unrar-free vim-common vesta-ioncube vesta-softaculous net-tools"
 elif [ "$release" -eq 8 ]; then
 elif [ "$release" -eq 8 ]; then
     software="nginx apache2 apache2-utils apache2.2-common
     software="nginx apache2 apache2-utils apache2.2-common
         apache2-suexec-custom libapache2-mod-ruid2
         apache2-suexec-custom libapache2-mod-ruid2
@@ -42,7 +42,7 @@ elif [ "$release" -eq 8 ]; then
         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 libmail-dkim-perl
         bsdmainutils cron vesta vesta-nginx vesta-php expect libmail-dkim-perl
-        unrar-free vim-common net-tools"
+        unrar-free vim-common vesta-ioncube vesta-softaculous net-tools"
 else
 else
     software="nginx apache2 apache2-utils apache2.2-common
     software="nginx apache2 apache2-utils apache2.2-common
         apache2-suexec-custom libapache2-mod-ruid2
         apache2-suexec-custom libapache2-mod-ruid2
@@ -55,7 +55,7 @@ else
         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 unrar-free
         bsdmainutils cron vesta vesta-nginx vesta-php expect unrar-free
-        vim-common net-tools"
+        vim-common vesta-ioncube vesta-softaculous net-tools"
 fi
 fi
 
 
 # Defining help function
 # Defining help function
@@ -76,6 +76,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
@@ -85,7 +86,7 @@ help() {
   -f, --force             Force installation
   -f, --force             Force installation
   -h, --help              Print this help
   -h, --help              Print this help
 
 
-  Example: bash $0 -e demo@hestiacp.com -p p4ssw0rd --apache no --phpfpm yes"
+  Example: bash $0 -e demo@vestacp.com -p p4ssw0rd --apache no --phpfpm yes"
     exit 1
     exit 1
 }
 }
 
 
@@ -163,6 +164,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 " ;;
@@ -196,6 +198,7 @@ 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
         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
@@ -229,6 +232,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'
@@ -270,7 +274,7 @@ if [ ! -e '/usr/bin/wget' ]; then
 fi
 fi
 
 
 # Checking repository availability
 # Checking repository availability
-wget -q "https://gpg.hestiacp.com/deb_signing.key" -O /dev/null
+wget -q "c.vestacp.com/deb_signing.key" -O /dev/null
 check_result $? "No access to Vesta repository"
 check_result $? "No access to Vesta repository"
 
 
 # Check installed packages
 # Check installed packages
@@ -305,13 +309,13 @@ fi
 # Printing nice ascii aslogo
 # Printing nice ascii aslogo
 clear
 clear
 echo
 echo
-echo '  _   _           _   _        ____ ____  '
-echo ' | | | | ___  ___| |_(_) __ _ / ___|  _ \ '
-echo ' | |_| |/ _ \/ __| __| |/ _` | |   | |_) |'
-echo ' |  _  |  __/\__ \ |_| | (_| | |___|  __/ '
-echo ' |_| |_|\___||___/\__|_|\__,_|\____|_|    '
+echo ' _|      _|  _|_|_|_|    _|_|_|  _|_|_|_|_|    _|_|'
+echo ' _|      _|  _|        _|            _|      _|    _|'
+echo ' _|      _|  _|_|_|      _|_|        _|      _|_|_|_|'
+echo '   _|  _|    _|              _|      _|      _|    _|'
+echo '     _|      _|_|_|_|  _|_|_|        _|      _|    _|'
 echo
 echo
-echo '                      Hestia Control Panel'
+echo '                                  Vesta Control Panel'
 echo -e "\n\n"
 echo -e "\n\n"
 
 
 echo 'Following software will be installed on your system:'
 echo 'Following software will be installed on your system:'
@@ -470,8 +474,8 @@ wget http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
 apt-key add /tmp/nginx_signing.key
 apt-key add /tmp/nginx_signing.key
 
 
 # Installing vesta repo
 # Installing vesta repo
-echo "deb http://$RHOST/ $codename main" > $apt/hestia.list
-wget https://gpg.hestiacp.com/deb_signing.key -O deb_signing.key
+echo "deb http://$RHOST/$codename/ $codename vesta" > $apt/vesta.list
+wget $CHOST/deb_signing.key -O deb_signing.key
 apt-key add deb_signing.key
 apt-key add deb_signing.key
 
 
 
 
@@ -613,6 +617,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
@@ -675,9 +682,9 @@ chmod 755 /usr/bin/rssh
 #                     Configure VESTA                      #
 #                     Configure VESTA                      #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Downloading sudo configuration
+# Installing sudo configuration
 mkdir -p /etc/sudoers.d
 mkdir -p /etc/sudoers.d
-wget $vestacp/sudo/admin -O /etc/sudoers.d/admin
+cp -f $vestacp/sudo/admin /etc/sudoers.d/
 chmod 440 /etc/sudoers.d/admin
 chmod 440 /etc/sudoers.d/admin
 
 
 # Configuring system env
 # Configuring system env
@@ -688,8 +695,8 @@ echo 'PATH=$PATH:'$VESTA'/bin' >> /root/.bash_profile
 echo 'export PATH' >> /root/.bash_profile
 echo 'export PATH' >> /root/.bash_profile
 source /root/.bash_profile
 source /root/.bash_profile
 
 
-# Configuring logrotate for vesta logs
-wget $vestacp/logrotate/vesta -O /etc/logrotate.d/vesta
+# Configuring logrotate for Vesta logs
+cp -f $vestacp/logrotate/vesta /etc/logrotate.d/
 
 
 # Building directory tree and creating some blank files for vesta
 # Building directory tree and creating some blank files for vesta
 mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \
 mkdir -p $VESTA/conf $VESTA/log $VESTA/ssl $VESTA/data/ips \
@@ -801,25 +808,18 @@ echo "LANGUAGE='$lang'" >> $VESTA/conf/vesta.conf
 # Version
 # Version
 echo "VERSION='0.9.8'" >> $VESTA/conf/vesta.conf
 echo "VERSION='0.9.8'" >> $VESTA/conf/vesta.conf
 
 
-# Downloading hosting packages
-cd $VESTA/data
-wget $vestacp/packages.tar.gz -O packages.tar.gz
-tar -xzf packages.tar.gz
-rm -f packages.tar.gz
+# Installing hosting packages
+cp -rf $vestacp/packages $VESTA/data/
 
 
-# Downloading templates
-wget $vestacp/templates.tar.gz -O templates.tar.gz
-tar -xzf templates.tar.gz
-rm -f templates.tar.gz
+# Installing templates
+cp -rf $vestacp/templates $VESTA/data/
 
 
 # Copying index.html to default documentroot
 # Copying index.html to default documentroot
-cp templates/web/skel/public_html/index.html /var/www/
+cp $VESTA/data/templates/web/skel/public_html/index.html /var/www/
 sed -i 's/%domain%/It worked!/g' /var/www/index.html
 sed -i 's/%domain%/It worked!/g' /var/www/index.html
 
 
-# Downloading firewall rules
-wget $vestacp/firewall.tar.gz -O firewall.tar.gz
-tar -xzf firewall.tar.gz
-rm -f firewall.tar.gz
+# Installing firewall rules
+cp -rf $vestacp/firewall $VESTA/data/
 
 
 # Configuring server hostname
 # Configuring server hostname
 $VESTA/bin/v-change-sys-hostname $servername 2>/dev/null
 $VESTA/bin/v-change-sys-hostname $servername 2>/dev/null
@@ -848,12 +848,12 @@ rm /tmp/vst.pem
 
 
 if [ "$nginx" = 'yes' ]; then
 if [ "$nginx" = 'yes' ]; then
     rm -f /etc/nginx/conf.d/*.conf
     rm -f /etc/nginx/conf.d/*.conf
-    wget $vestacp/nginx/nginx.conf -O /etc/nginx/nginx.conf
-    wget $vestacp/nginx/status.conf -O /etc/nginx/conf.d/status.conf
-    wget $vestacp/nginx/phpmyadmin.inc -O /etc/nginx/conf.d/phpmyadmin.inc
-    wget $vestacp/nginx/phppgadmin.inc -O /etc/nginx/conf.d/phppgadmin.inc
-    wget $vestacp/nginx/webmail.inc -O /etc/nginx/conf.d/webmail.inc
-    wget $vestacp/logrotate/nginx -O /etc/logrotate.d/nginx
+    cp -f $vestacp/nginx/nginx.conf /etc/nginx/
+    cp -f $vestacp/nginx/status.conf /etc/nginx/conf.d/
+    cp -f $vestacp/nginx/phpmyadmin.inc /etc/nginx/conf.d/
+    cp -f $vestacp/nginx/phppgadmin.inc /etc/nginx/conf.d/
+    cp -f $vestacp/nginx/webmail.inc /etc/nginx/conf.d/
+    cp -f $vestacp/logrotate/nginx /etc/logrotate.d/
     echo > /etc/nginx/conf.d/vesta.conf
     echo > /etc/nginx/conf.d/vesta.conf
     mkdir -p /var/log/nginx/domains
     mkdir -p /var/log/nginx/domains
     update-rc.d nginx defaults
     update-rc.d nginx defaults
@@ -867,9 +867,9 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$apache" = 'yes'  ]; then
 if [ "$apache" = 'yes'  ]; then
-    wget $vestacp/apache2/apache2.conf -O /etc/apache2/apache2.conf
-    wget $vestacp/apache2/status.conf -O /etc/apache2/mods-enabled/status.conf
-    wget $vestacp/logrotate/apache2 -O /etc/logrotate.d/apache2
+    cp -f $vestacp/apache2/apache2.conf /etc/apache2/
+    cp -f $vestacp/apache2/status.conf /etc/apache2/mods-enabled/
+    cp -f  $vestacp/logrotate/apache2 /etc/logrotate.d/
     a2enmod rewrite
     a2enmod rewrite
     a2enmod suexec
     a2enmod suexec
     a2enmod ssl
     a2enmod ssl
@@ -902,12 +902,12 @@ fi
 
 
 if [ "$phpfpm" = 'yes' ]; then
 if [ "$phpfpm" = 'yes' ]; then
     if [ "$release" -eq 9 ]; then
     if [ "$release" -eq 9 ]; then
-        wget $vestacp/php-fpm/www.conf -O /etc/php/7.0/fpm/pool.d/www.conf
+        cp -f $vestacp/php-fpm/www.conf /etc/php/7.0/fpm/pool.d/www.conf
         update-rc.d php7.0-fpm defaults
         update-rc.d php7.0-fpm defaults
         service php7.0-fpm start
         service php7.0-fpm start
         check_result $? "php-fpm start failed"
         check_result $? "php-fpm start failed"
     else
     else
-        wget $vestacp/php5-fpm/www.conf -O /etc/php5/fpm/pool.d/www.conf
+        cp -f $vestacp/php5-fpm/www.conf /etc/php5/fpm/pool.d/www.conf
         update-rc.d php5-fpm defaults
         update-rc.d php5-fpm defaults
         service php5-fpm start
         service php5-fpm start
         check_result $? "php-fpm start failed"
         check_result $? "php-fpm start failed"
@@ -934,7 +934,7 @@ done
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$vsftpd" = 'yes' ]; then
 if [ "$vsftpd" = 'yes' ]; then
-    wget $vestacp/vsftpd/vsftpd.conf -O /etc/vsftpd.conf
+    cp -f $vestacp/vsftpd/vsftpd.conf /etc/
     update-rc.d vsftpd defaults
     update-rc.d vsftpd defaults
     service vsftpd start
     service vsftpd start
     check_result $? "vsftpd start failed"
     check_result $? "vsftpd start failed"
@@ -950,7 +950,7 @@ fi
 
 
 if [ "$proftpd" = 'yes' ]; then
 if [ "$proftpd" = 'yes' ]; then
     echo "127.0.0.1 $servername" >> /etc/hosts
     echo "127.0.0.1 $servername" >> /etc/hosts
-    wget $vestacp/proftpd/proftpd.conf -O /etc/proftpd/proftpd.conf
+    cp -f $vestacp/proftpd/proftpd.conf /etc/proftpd/
     update-rc.d proftpd defaults
     update-rc.d proftpd defaults
     service proftpd start
     service proftpd start
     check_result $? "proftpd start failed"
     check_result $? "proftpd start failed"
@@ -971,7 +971,7 @@ if [ "$mysql" = 'yes' ]; then
     fi
     fi
 
 
     # MySQL configuration
     # MySQL configuration
-    wget $vestacp/mysql/$mycnf -O /etc/mysql/my.cnf
+    cp -f $vestacp/mysql/$mycnf /etc/mysql/my.cnf
     mysql_install_db
     mysql_install_db
     update-rc.d mysql defaults
     update-rc.d mysql defaults
     service mysql start
     service mysql start
@@ -990,10 +990,10 @@ if [ "$mysql" = 'yes' ]; then
 
 
     # Configuring phpMyAdmin
     # Configuring phpMyAdmin
     if [ "$apache" = 'yes' ]; then
     if [ "$apache" = 'yes' ]; then
-        wget $vestacp/pma/apache.conf -O /etc/phpmyadmin/apache.conf
+        cp -f $vestacp/pma/apache.conf /etc/phpmyadmin/
         ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
         ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf
     fi
     fi
-    wget $vestacp/pma/config.inc.php -O /etc/phpmyadmin/config.inc.php
+    cp -f $vestacp/pma/config.inc.php /etc/phpmyadmin/
     chmod 777 /var/lib/phpmyadmin/tmp
     chmod 777 /var/lib/phpmyadmin/tmp
 fi
 fi
 
 
@@ -1003,16 +1003,15 @@ fi
 
 
 if [ "$postgresql" = 'yes' ]; then
 if [ "$postgresql" = 'yes' ]; then
     ppass=$(gen_pass)
     ppass=$(gen_pass)
-    wget $vestacp/postgresql/pg_hba.conf -O /etc/postgresql/*/main/pg_hba.conf
+    cp -f $vestacp/postgresql/pg_hba.conf /etc/postgresql/*/main/
     service postgresql restart
     service postgresql restart
     sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
     sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD '$ppass'"
 
 
     # Configuring phpPgAdmin
     # Configuring phpPgAdmin
     if [ "$apache" = 'yes' ]; then
     if [ "$apache" = 'yes' ]; then
-        wget $vestacp/pga/phppgadmin.conf \
-            -O /etc/apache2/conf.d/phppgadmin.conf
+        cp -f $vestacp/pga/phppgadmin.conf /etc/apache2/conf.d/
     fi
     fi
-    wget $vestacp/pga/config.inc.php -O /etc/phppgadmin/config.inc.php
+    cp -f $vestacp/pga/config.inc.php /etc/phppgadmin/
 fi
 fi
 
 
 
 
@@ -1021,7 +1020,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$named" = 'yes' ]; then
 if [ "$named" = 'yes' ]; then
-    wget $vestacp/bind/named.conf -O /etc/bind/named.conf
+    cp -f $vestacp/bind/named.conf /etc/bind/
     sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
     sed -i "s%listen-on%//listen%" /etc/bind/named.conf.options
     chown root:bind /etc/bind/named.conf
     chown root:bind /etc/bind/named.conf
     chmod 640 /etc/bind/named.conf
     chmod 640 /etc/bind/named.conf
@@ -1042,9 +1041,9 @@ fi
 
 
 if [ "$exim" = 'yes' ]; then
 if [ "$exim" = 'yes' ]; then
     gpasswd -a Debian-exim mail
     gpasswd -a Debian-exim mail
-    wget $vestacp/exim/exim4.conf.template -O /etc/exim4/exim4.conf.template
-    wget $vestacp/exim/dnsbl.conf -O /etc/exim4/dnsbl.conf
-    wget $vestacp/exim/spam-blocks.conf -O /etc/exim4/spam-blocks.conf
+    cp -f $vestacp/exim/exim4.conf.template /etc/exim4/
+    cp -f $vestacp/exim/dnsbl.conf /etc/exim4/
+    cp -f $vestacp/exim/spam-blocks.conf /etc/exim4/
     touch /etc/exim4/white-blocks.conf
     touch /etc/exim4/white-blocks.conf
 
 
     if [ "$spamd" = 'yes' ]; then
     if [ "$spamd" = 'yes' ]; then
@@ -1077,12 +1076,8 @@ fi
 
 
 if [ "$dovecot" = 'yes' ]; then
 if [ "$dovecot" = 'yes' ]; then
     gpasswd -a dovecot mail
     gpasswd -a dovecot mail
-    wget $vestacp/dovecot.tar.gz -O /etc/dovecot.tar.gz
-    wget $vestacp/logrotate/dovecot -O /etc/logrotate.d/dovecot
-    cd /etc
-    rm -rf dovecot dovecot.conf
-    tar -xzf dovecot.tar.gz
-    rm -f dovecot.tar.gz
+    cp -rf $vestacp/dovecot /etc/
+    cp -f $vestacp/logrotate/dovecot /etc/logrotate.d/
     chown -R root:root /etc/dovecot*
     chown -R root:root /etc/dovecot*
     update-rc.d dovecot defaults
     update-rc.d dovecot defaults
     service dovecot start
     service dovecot start
@@ -1097,7 +1092,7 @@ fi
 if [ "$clamd" = 'yes' ]; then
 if [ "$clamd" = 'yes' ]; then
     gpasswd -a clamav mail
     gpasswd -a clamav mail
     gpasswd -a clamav Debian-exim
     gpasswd -a clamav Debian-exim
-    wget $vestacp/clamav/clamd.conf -O /etc/clamav/clamd.conf
+    cp -f $vestacp/clamav/clamd.conf /etc/clamav/
     /usr/bin/freshclam
     /usr/bin/freshclam
     update-rc.d clamav-daemon defaults
     update-rc.d clamav-daemon defaults
     if [ ! -d "/var/run/clamav" ]; then
     if [ ! -d "/var/run/clamav" ]; then
@@ -1138,19 +1133,18 @@ fi
 
 
 if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
 if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
     if [ "$apache" = 'yes' ]; then
     if [ "$apache" = 'yes' ]; then
-        wget $vestacp/roundcube/apache.conf -O /etc/roundcube/apache.conf
+        cp -f $vestacp/roundcube/apache.conf /etc/roundcube/
         ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
         ln -s /etc/roundcube/apache.conf /etc/apache2/conf.d/roundcube.conf
     fi
     fi
-    wget $vestacp/roundcube/main.inc.php -O /etc/roundcube/main.inc.php
-    wget $vestacp/roundcube/db.inc.php -O /etc/roundcube/db.inc.php
+    cp -f $vestacp/roundcube/main.inc.php /etc/roundcube/
+    cp -f  $vestacp/roundcube/db.inc.php /etc/roundcube/
     chmod 640 /etc/roundcube/debian-db-roundcube.php
     chmod 640 /etc/roundcube/debian-db-roundcube.php
     chmod 640 /etc/roundcube/config.inc.php
     chmod 640 /etc/roundcube/config.inc.php
     chown root:www-data /etc/roundcube/debian-db-roundcube.php
     chown root:www-data /etc/roundcube/debian-db-roundcube.php
     chown root:www-data /etc/roundcube/config.inc.php
     chown root:www-data /etc/roundcube/config.inc.php
-    wget $vestacp/roundcube/vesta.php -O \
-        /usr/share/roundcube/plugins/password/drivers/vesta.php
-    wget $vestacp/roundcube/config.inc.php -O \
-        /etc/roundcube/plugins/password/config.inc.php
+    cp -f $vestacp/roundcube/vesta.php \
+        /usr/share/roundcube/plugins/password/drivers/
+    cp -f $vestacp/roundcube/config.inc.php /etc/roundcube/plugins/password/
     r="$(gen_pass)"
     r="$(gen_pass)"
     mysql -e "CREATE DATABASE roundcube"
     mysql -e "CREATE DATABASE roundcube"
     mysql -e "GRANT ALL ON roundcube.* 
     mysql -e "GRANT ALL ON roundcube.* 
@@ -1201,10 +1195,7 @@ fi
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 if [ "$fail2ban" = 'yes' ]; then
 if [ "$fail2ban" = 'yes' ]; then
-    cd /etc
-    wget $vestacp/fail2ban.tar.gz -O fail2ban.tar.gz
-    tar -xzf fail2ban.tar.gz
-    rm -f fail2ban.tar.gz
+    cp -rf $vestacp/fail2ban /etc/
     if [ "$dovecot" = 'no' ]; then
     if [ "$dovecot" = 'no' ]; then
         fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
         fline=$(cat /etc/fail2ban/jail.local |grep -n dovecot-iptables -A 2)
         fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
         fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
@@ -1215,6 +1206,15 @@ if [ "$fail2ban" = 'yes' ]; then
         fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
         fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
         sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
         sed -i "${fline}s/true/false/" /etc/fail2ban/jail.local
     fi
     fi
+    if [ "$vsftpd" = 'yes' ]; then
+        #Create vsftpd Log File
+        if [ ! -f "/var/log/vsftpd.log" ]; then
+            touch /var/log/vsftpd.log
+        fi
+        fline=$(cat /etc/fail2ban/jail.local |grep -n vsftpd-iptables -A 2)
+        fline=$(echo "$fline" |grep enabled |tail -n1 |cut -f 1 -d -)
+        sed -i "${fline}s/false/true/" /etc/fail2ban/jail.local
+    fi 
     update-rc.d fail2ban defaults
     update-rc.d fail2ban defaults
     service fail2ban start
     service fail2ban start
     check_result $? "fail2ban start failed"
     check_result $? "fail2ban start failed"
@@ -1264,7 +1264,7 @@ if [ "$iptables" = 'yes' ]; then
 fi
 fi
 
 
 # Get public ip
 # Get public ip
-pub_ip=$(curl -s https://hestiacp.com/what-is-my-ip/)
+pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
 
 
 if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
 if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
     $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
     $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
@@ -1374,20 +1374,20 @@ Thank you.
 
 
 --
 --
 Sincerely yours
 Sincerely yours
-HestiaCP.com team
+vestacp.com team
 " > $tmpfile
 " > $tmpfile
 
 
 send_mail="$VESTA/web/inc/mail-wrapper.php"
 send_mail="$VESTA/web/inc/mail-wrapper.php"
-cat $tmpfile | $send_mail -s "Hestia Control Panel" $email
+cat $tmpfile | $send_mail -s "Vesta Control Panel" $email
 
 
 # Congrats
 # Congrats
 echo '======================================================='
 echo '======================================================='
 echo
 echo
-echo '  _   _           _   _        ____ ____  '
-echo ' | | | | ___  ___| |_(_) __ _ / ___|  _ \ '
-echo ' | |_| |/ _ \/ __| __| |/ _` | |   | |_) |'
-echo ' |  _  |  __/\__ \ |_| | (_| | |___|  __/ '
-echo ' |_| |_|\___||___/\__|_|\__,_|\____|_|    '
+echo ' _|      _|  _|_|_|_|    _|_|_|  _|_|_|_|_|    _|_|   '
+echo ' _|      _|  _|        _|            _|      _|    _| '
+echo ' _|      _|  _|_|_|      _|_|        _|      _|_|_|_| '
+echo '   _|  _|    _|              _|      _|      _|    _| '
+echo '     _|      _|_|_|_|  _|_|_|        _|      _|    _| '
 echo
 echo
 echo
 echo
 cat $tmpfile
 cat $tmpfile