Browse Source

Updated to use ssl and modified to use hestia repo.

Raphael Schneeberger 7 năm trước cách đây
mục cha
commit
4659a6778b

+ 25 - 37
install/vst-install-debian.sh

@@ -1,14 +1,14 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Vesta Debian installer v.05
+# Hestia Debian installer v.06
 
 
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 #                  Variables&Functions                     #
 #                  Variables&Functions                     #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 export PATH=$PATH:/sbin
 export PATH=$PATH:/sbin
 export DEBIAN_FRONTEND=noninteractive
 export DEBIAN_FRONTEND=noninteractive
-RHOST='apt.vestacp.com'
-CHOST='c.vestacp.com'
+RHOST='apt.hestiacp.com'
+CHOST='c.hestiacp.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="http://$CHOST/$VERSION/$release"
+vestacp="https://$CHOST/$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 vesta-ioncube vesta-softaculous net-tools"
+        unrar-free vim-common 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 vesta-ioncube vesta-softaculous net-tools"
+        unrar-free vim-common 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 vesta-ioncube vesta-softaculous net-tools"
+        vim-common net-tools"
 fi
 fi
 
 
 # Defining help function
 # Defining help function
@@ -76,7 +76,6 @@ 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
@@ -86,7 +85,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@vestacp.com -p p4ssw0rd --apache no --phpfpm yes"
+  Example: bash $0 -e demo@hestiacp.com -p p4ssw0rd --apache no --phpfpm yes"
     exit 1
     exit 1
 }
 }
 
 
@@ -164,7 +163,6 @@ 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 " ;;
@@ -198,7 +196,6 @@ 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
@@ -232,7 +229,6 @@ 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'
@@ -309,13 +305,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 '                                  Vesta Control Panel'
+echo '                      Hestia 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:'
@@ -474,7 +470,7 @@ 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/ $codename vesta" > $apt/vesta.list
+echo "deb http://$RHOST/ $codename main" > $apt/hestia.list
 wget $CHOST/deb_signing.key -O deb_signing.key
 wget $CHOST/deb_signing.key -O deb_signing.key
 apt-key add deb_signing.key
 apt-key add deb_signing.key
 
 
@@ -617,9 +613,6 @@ 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
@@ -1269,7 +1262,7 @@ if [ "$iptables" = 'yes' ]; then
 fi
 fi
 
 
 # Get public ip
 # Get public ip
-pub_ip=$(curl -s vestacp.com/what-is-my-ip/)
+pub_ip=$(curl -s https://hestiacp.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
@@ -1337,11 +1330,6 @@ 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
@@ -1359,8 +1347,8 @@ $VESTA/bin/v-add-cron-vesta-autoupdate
 #                   Vesta Access Info                      #
 #                   Vesta Access Info                      #
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
-# Sending install notification to vestacp.com
-wget vestacp.com/notify/?$codename -O /dev/null -q
+# Sending install notification to hestiacp.com
+wget https://hestiacp.com/notify/?os=$os\&version=$release -O /dev/null -q
 
 
 # Comparing hostname and ip
 # Comparing hostname and ip
 host_ip=$(host $servername| head -n 1 | awk '{print $NF}')
 host_ip=$(host $servername| head -n 1 | awk '{print $NF}')
@@ -1382,20 +1370,20 @@ Thank you.
 
 
 --
 --
 Sincerely yours
 Sincerely yours
-vestacp.com team
+HestiaCP.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 "Vesta Control Panel" $email
+cat $tmpfile | $send_mail -s "Hestia 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

+ 3 - 3
install/vst-install-ubuntu.sh

@@ -16,7 +16,7 @@ arch=$(uname -i)
 os='ubuntu'
 os='ubuntu'
 release="$(lsb_release -s -r)"
 release="$(lsb_release -s -r)"
 codename="$(lsb_release -s -c)"
 codename="$(lsb_release -s -c)"
-vestacp="$VESTA/install/$VERSION/$release"
+vestacp="https://$VESTA/install/$VERSION/$release"
 
 
 # Defining software pack for all distros
 # Defining software pack for all distros
 software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
 software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
@@ -1218,7 +1218,7 @@ if [ "$iptables" = 'yes' ]; then
 fi
 fi
 
 
 # Get public IP
 # Get public IP
-pub_ip=$(curl -s hestiaacp.com/what-is-my-ip/)
+pub_ip=$(curl -s https://hestiacp.com/what-is-my-ip/)
 if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
 if [ ! -z "$pub_ip" ] && [ "$pub_ip" != "$ip" ]; then
     echo "$VESTA/bin/v-update-sys-ip" >> /etc/rc.local
     echo "$VESTA/bin/v-update-sys-ip" >> /etc/rc.local
     $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
     $VESTA/bin/v-change-sys-ip-nat $ip $pub_ip
@@ -1283,7 +1283,7 @@ $VESTA/bin/v-add-cron-vesta-autoupdate
 #----------------------------------------------------------#
 #----------------------------------------------------------#
 
 
 # Sending install notification to hestiacp.com
 # Sending install notification to hestiacp.com
-wget hestiacp.com/notify/?os=$os\&version=$release -O /dev/null -q
+wget https://hestiacp.com/notify/?os=$os\&version=$release -O /dev/null -q
 
 
 # Comparing hostname and IP
 # Comparing hostname and IP
 host_ip=$(host $servername| head -n 1 |awk '{print $NF}')
 host_ip=$(host $servername| head -n 1 |awk '{print $NF}')