Преглед изворни кода

Revert "Feature/beta repo support (#2402)" (#2407)

This reverts commit 26e11084ed8198f044a6e9d6954d30e47ed402ad.
Jaap Marcus пре 4 година
родитељ
комит
590d8e77a6
4 измењених фајлова са 10 додато и 141 уклоњено
  1. 2 2
      bin/v-change-sys-release
  2. 0 77
      bin/v-change-sys-repo
  3. 4 29
      install/hst-install-debian.sh
  4. 4 33
      install/hst-install-ubuntu.sh

+ 2 - 2
bin/v-change-sys-release

@@ -1,10 +1,10 @@
 #!/bin/bash
-# info: Update release branch variable
+# info: update web templates
 # options: [RESTART]
 #
 # This function for changing the release branch for the
 # Hestia Control Panel. This allows the user to switch between
-# stable and pre-release builds which will automatically update
+# stable and pre-release builds which will automaticlly update
 # based on the appropriate release schedule if auto-update is
 # turned on.
 

+ 0 - 77
bin/v-change-sys-repo

@@ -1,77 +0,0 @@
-#!/bin/bash
-# info: Switch between release / development or beta apt repository 
-# options: [RESTART]
-#
-# This function allows switching between the stable (apt.hestiacp.com) and unstable (beta.hestiacp.com) apt repository 
-
-#----------------------------------------------------------#
-#                Variables & Functions                     #
-#----------------------------------------------------------#
-
-# Argument definition
-repo=$1
-
-# Includes
-# shellcheck source=/etc/hestiacp/hestia.conf
-source /etc/hestiacp/hestia.conf
-# shellcheck source=/usr/local/hestia/func/main.sh
-source $HESTIA/func/main.sh
-# load config file
-source_conf "$HESTIA/conf/hestia.conf"
-
-#----------------------------------------------------------#
-#                    Verifications                         #
-#----------------------------------------------------------#
-
-# Perform verification if read-only mode is enabled
-check_hestia_demo_mode
-
-#----------------------------------------------------------#
-#                       Action                             #
-#----------------------------------------------------------#
-
-# Define apt conf location
-apt=/etc/apt/sources.list.d
-RHOSTBETA="beta.hestiacp.com"
-codename="$(lsb_release -s -c)"
-release="$(lsb_release -s -r)"
-RHOST='apt.hestiacp.com'
-# Get Architecture
-architecture="$(uname -m)"
-case $architecture in 
-x86_64)
-    ARCH="amd64"
-    ;;
- aarch64)
-    ARCH="arm64"
-    ;;
-*)
-    echo "   [ ! ] Unsuported architectrue"
-esac
-
-if [ $repo != "beta" ]; then
-    if [ -f "$apt/hestia-beta.list" ]; then
-        rm $apt/hestia-beta.list
-        sed -i 's/#deb/deb/' $apt/hestia.list
-    else
-        echo "apt.hestiacp.com already active"
-        exit 1; 
-    fi
-else
-    if [ ! -f "$apt/hestia-beta.list" ]; then
-        sed -i 's/deb/#deb/' $apt/hestia.list
-        echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-beta-keyring.gpg] https://$RHOSTBETA/ $codename main" > $apt/hestia-beta.list
-        curl -s "https://$RHOSTBETA/pubkey.gpg" | gpg --dearmor | tee /usr/share/keyrings/hestia-beta-keyring.gpg  >/dev/null 2>&1
-    else
-        echo "beta.hestiacp.com already active"
-        exit 1; 
-    fi
-fi
-
-#----------------------------------------------------------#
-#                       Hestia                             #
-#----------------------------------------------------------#
-
-$BIN/v-log-action "system" "Info" "System" "Update APT repository changed  (Value: $repo)."
-
-exit

+ 4 - 29
install/hst-install-debian.sh

@@ -16,7 +16,6 @@
 export PATH=$PATH:/sbin
 export DEBIAN_FRONTEND=noninteractive
 RHOST='apt.hestiacp.com'
-RHOSTBETA='beta.hestiacp.com'
 GPG='gpg.hestiacp.com'
 VERSION='debian'
 HESTIA='/usr/local/hestia'
@@ -104,7 +103,6 @@ help() {
   -e, --email             Set admin email
   -p, --password          Set admin password
   -D, --with-debs         Path to Hestia debs
-  -B, --beta              Development version   [yes|no]  default: yes 
   -f, --force             Force installation
   -h, --help              Print this help
 
@@ -238,7 +236,6 @@ for arg; do
         --password)             args="${args}-p " ;;
         --force)                args="${args}-f " ;;
         --with-debs)            args="${args}-D " ;;
-        --beta)                 args="${args}-B " ;;
         --help)                 args="${args}-h " ;;
         *)                      [[ "${arg:0:1}" == "-" ]] || delim="\""
                                 args="${args}${delim}${arg}${delim} ";;
@@ -247,7 +244,7 @@ done
 eval set -- "$args"
 
 # Parsing arguments
-while getopts "a:w:v:j:k:m:g:d:x:z:Z:c:t:i:b:r:o:q:l:y:s:e:p:D:B:fh" Option; do
+while getopts "a:w:v:j:k:m:g:d:x:z:Z:c:t:i:b:r:o:q:l:y:s:e:p:D:fh" Option; do
     case $Option in
         a) apache=$OPTARG ;;            # Apache
         w) phpfpm=$OPTARG ;;            # PHP-FPM
@@ -273,7 +270,6 @@ while getopts "a:w:v:j:k:m:g:d:x:z:Z:c:t:i:b:r:o:q:l:y:s:e:p:D:B:fh" Option; do
         e) email=$OPTARG ;;             # Admin email
         p) vpass=$OPTARG ;;             # Admin password
         D) withdebs=$OPTARG ;;          # Hestia debs path
-        B) beta=$OPTARG ;;              # Hestia preview program
         f) force='yes' ;;               # Force install
         h) help ;;                      # Help
         *) help ;;                      # Print help (default)
@@ -308,7 +304,6 @@ set_default_value 'fail2ban' 'yes'
 set_default_value 'quota' 'no'
 set_default_value 'interactive' 'yes'
 set_default_value 'api' 'yes'
-set_default_value 'beta' 'no'
 set_default_port '8083'
 set_default_lang 'en'
 
@@ -447,10 +442,10 @@ if [ -d /etc/netplan ] && [ -z "$force" ]; then
     fi
 fi
 
+# Validate whether installation script matches release version before continuing with install
 if [ -z "$withdebs" ] || [ ! -d "$withdebs" ]; then
-    # Validate whether installation script matches release version before continuing with install
     release_branch_ver=$(curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/release/src/deb/hestia/control |grep "Version:" |awk '{print $2}')
-    if [ "$HESTIA_INSTALL_VER" != "$release_branch_ver" ] && [ $beta != 'yes' ]; then
+    if [ "$HESTIA_INSTALL_VER" != "$release_branch_ver" ]; then
         echo
         echo -e "\e[91mInstallation aborted\e[0m"
         echo "===================================================================="
@@ -465,20 +460,6 @@ if [ -z "$withdebs" ] || [ ! -d "$withdebs" ]; then
         echo ""
         check_result 1 "Installation aborted"
     fi
-    
-    # Validate if a development version is installed when --beta is enabled
-    DISPLAY_VER=$(echo $HESTIA_INSTALL_VER | sed "s|~alpha||g" | sed "s|~beta||g")
-    if [ "$HESTIA_INSTALL_VER" = "$DISPLAY_VER" ] && [ $beta = 'yes' ]; then
-        echo
-        echo -e "\e[91mInstallation aborted\e[0m"
-        echo "===================================================================="
-        echo -e "\e[33mERROR: Unable to use beta atp server for stable release\e[0m"
-        echo -e "\e[33mPlease remove the -B or --beta flag from the installer string\e[0m"
-                
-        echo ""
-        check_result 1 "Installation aborted"
-    fi
-    
 fi
 
 case $architecture in 
@@ -741,16 +722,10 @@ if [ "$mysql" = 'yes' ]; then
     curl -s https://mariadb.org/mariadb_release_signing_key.asc | gpg --dearmor | tee /usr/share/keyrings/mariadb-keyring.gpg >/dev/null 2>&1
 fi
 
+# Installing HestiaCP repo
 echo "[ * ] Hestia Control Panel"
 echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-keyring.gpg] https://$RHOST/ $codename main" > $apt/hestia.list
 gpg --no-default-keyring --keyring /usr/share/keyrings/hestia-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A189E93654F0B0E5 >/dev/null 2>&1
-if [ "$beta" = 'yes' ]; then
-  # Enable preview mode
-  sed -i 's/deb/#deb/' $apt/hestia.list
-  echo "[ ! ] Hestia Control Panel (Preview version)"
-  echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-beta-keyring.gpg] https://$RHOSTBETA/ $codename main" > $apt/hestia-beta.list
-  curl -s "https://$RHOSTBETA/pubkey.gpg" | gpg --dearmor | tee /usr/share/keyrings/hestia-beta-keyring.gpg  >/dev/null 2>&1
-fi
 
 # Installing PostgreSQL repo
 if [ "$postgresql" = 'yes' ]; then

+ 4 - 33
install/hst-install-ubuntu.sh

@@ -16,8 +16,6 @@
 export PATH=$PATH:/sbin
 export DEBIAN_FRONTEND=noninteractive
 RHOST='apt.hestiacp.com'
-RHOSTBETA='beta.hestiacp.com'
-
 GPG='gpg.hestiacp.com'
 VERSION='ubuntu'
 HESTIA='/usr/local/hestia'
@@ -86,7 +84,6 @@ help() {
   -e, --email             Set admin email
   -p, --password          Set admin password
   -D, --with-debs         Path to Hestia debs
-  -B, --beta              Development version   [yes|no]  default: yes            
   -f, --force             Force installation
   -h, --help              Print this help
 
@@ -218,7 +215,6 @@ for arg; do
         --email)                args="${args}-e " ;;
         --password)             args="${args}-p " ;;
         --force)                args="${args}-f " ;;
-        --beta)                  args="${args}-B " ;;
         --with-debs)            args="${args}-D " ;;
         --help)                 args="${args}-h " ;;
         *)                      [[ "${arg:0:1}" == "-" ]] || delim="\""
@@ -228,7 +224,7 @@ done
 eval set -- "$args"
 
 # Parsing arguments
-while getopts "a:w:v:j:k:m:g:d:x:z:Z:c:t:i:b:r:o:q:l:y:s:e:p:D:B:fh" Option; do
+while getopts "a:w:v:j:k:m:g:d:x:z:Z:c:t:i:b:r:o:q:l:y:s:e:p:D:fh" Option; do
     case $Option in
         a) apache=$OPTARG ;;            # Apache
         w) phpfpm=$OPTARG ;;            # PHP-FPM
@@ -253,7 +249,6 @@ while getopts "a:w:v:j:k:m:g:d:x:z:Z:c:t:i:b:r:o:q:l:y:s:e:p:D:B:fh" Option; do
         s) servername=$OPTARG ;;        # Hostname
         e) email=$OPTARG ;;             # Admin email
         p) vpass=$OPTARG ;;             # Admin password
-        B) beta=$OPTARG ;;              # Beta / Development version
         D) withdebs=$OPTARG ;;          # Hestia debs path
         f) force='yes' ;;               # Force install
         h) help ;;                      # Help
@@ -289,7 +284,6 @@ set_default_value 'fail2ban' 'yes'
 set_default_value 'quota' 'no'
 set_default_value 'interactive' 'yes'
 set_default_value 'api' 'yes'
-set_default_value 'beta' 'no'
 set_default_port '8083'
 set_default_lang 'en'
 
@@ -422,11 +416,10 @@ if [ -d /etc/netplan ] && [ -z "$force" ]; then
     fi
 fi
 
-
+# Validate whether installation script matches release version before continuing with install
 if [ -z "$withdebs" ] || [ ! -d "$withdebs" ]; then
-    # Validate whether installation script matches release version before continuing with install
     release_branch_ver=$(curl -s https://raw.githubusercontent.com/hestiacp/hestiacp/release/src/deb/hestia/control |grep "Version:" |awk '{print $2}')
-    if [ "$HESTIA_INSTALL_VER" != "$release_branch_ver" ] && [ $beta != 'yes' ]; then
+    if [ "$HESTIA_INSTALL_VER" != "$release_branch_ver" ]; then
         echo
         echo -e "\e[91mInstallation aborted\e[0m"
         echo "===================================================================="
@@ -441,20 +434,6 @@ if [ -z "$withdebs" ] || [ ! -d "$withdebs" ]; then
         echo ""
         check_result 1 "Installation aborted"
     fi
-    
-    # Validate if a development version is installed when --beta is enabled
-    DISPLAY_VER=$(echo $HESTIA_INSTALL_VER | sed "s|~alpha||g" | sed "s|~beta||g")
-    if [ "$HESTIA_INSTALL_VER" = "$DISPLAY_VER" ] && [ $beta = 'yes' ]; then
-        echo
-        echo -e "\e[91mInstallation aborted\e[0m"
-        echo "===================================================================="
-        echo -e "\e[33mERROR: Unable to use beta atp server for stable release\e[0m"
-        echo -e "\e[33mPlease remove the -B or --beta flag from the installer string\e[0m"
-        
-                
-        echo ""
-        check_result 1 "Installation aborted"
-    fi
 fi
 
 case $architecture in 
@@ -501,7 +480,7 @@ install_welcome_message() {
     echo "                            www.hestiacp.com                            "
     echo
     echo "========================================================================"
-    echo 
+    echo
     echo "Thank you for downloading Hestia Control Panel! In a few moments,"
     echo "we will begin installing the following components on your server:"
     echo
@@ -719,14 +698,6 @@ echo "[ * ] Hestia Control Panel"
 echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-keyring.gpg] https://$RHOST/ $codename main" > $apt/hestia.list
 gpg --no-default-keyring --keyring /usr/share/keyrings/hestia-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A189E93654F0B0E5 >/dev/null 2>&1
 
-if [ "$beta" = 'yes' ]; then
-  # Enable preview mode
-  sed -i 's/deb/#deb/' $apt/hestia.list
-  echo "[ ! ] Hestia Control Panel (Preview version)"
-  echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-beta-keyring.gpg] https://$RHOSTBETA/ $codename main" > $apt/hestia-beta.list
-  curl -s "https://$RHOSTBETA/pubkey.gpg" | gpg --dearmor | tee /usr/share/keyrings/hestia-beta-keyring.gpg  >/dev/null 2>&1
-fi
-
 # Installing PostgreSQL repo
 if [ "$postgresql" = 'yes' ]; then
     echo "[ * ] PostgreSQL"