Browse Source

Autocompile script should not overide HESTIA env variable

Robert Zollner 6 years ago
parent
commit
f0753bbeb1
3 changed files with 5 additions and 5 deletions
  1. 2 2
      bin/v-update-sys-hestia-git
  2. 1 1
      install/upgrade/1.00.0-190618.sh
  3. 2 2
      src/hst_autocompile.sh

+ 2 - 2
bin/v-update-sys-hestia-git

@@ -122,7 +122,7 @@ HESTIA_B='true'
 GIT_REP='https://raw.githubusercontent.com/hestiacp/hestiacp/'$branch'/src/deb'
 
 # Generate Links for sourcecode
-HESTIA='https://github.com/hestiacp/hestiacp/archive/'$branch'.zip'
+HESTIA_ARCHIVE_LINK='https://github.com/hestiacp/hestiacp/archive/'$branch'.zip'
 NGINX='https://nginx.org/download/nginx-'$NGINX_V'.tar.gz'
 OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_V'.tar.gz'
 PCRE='https://ftp.pcre.org/pub/pcre/pcre-'$PCRE_V'.tar.gz'
@@ -323,7 +323,7 @@ if [ "$HESTIA_B" = true ] ; then
     mkdir $BUILD_DIR/hestia_$HESTIA_V
 
     # Download and unpack source files
-    download_file $HESTIA
+    download_file $HESTIA_ARCHIVE_LINK
     unzip -q $branch.zip
     rm $branch.zip
 

+ 1 - 1
install/upgrade/1.00.0-190618.sh

@@ -1,7 +1,7 @@
 #!/bin/bash
 
 # Define vars
-if [ -z "$HESTIA" ]; then
+if [ -z "$HESTIA" ] || [ ! -f "${HESTIA}/conf/hestia.conf"]; then
     export HESTIA="/usr/local/hestia"
 fi
 HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"

+ 2 - 2
src/hst_autocompile.sh

@@ -175,7 +175,7 @@ fi
 GIT_REP='https://raw.githubusercontent.com/hestiacp/hestiacp/'$branch'/src/deb'
 
 # Generate Links for sourcecode
-HESTIA='https://github.com/hestiacp/hestiacp/archive/'$branch'.tar.gz'
+HESTIA_ARCHIVE_LINK='https://github.com/hestiacp/hestiacp/archive/'$branch'.tar.gz'
 NGINX='https://nginx.org/download/nginx-'$NGINX_V'.tar.gz'
 OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_V'.tar.gz'
 PCRE='https://ftp.pcre.org/pub/pcre/pcre-'$PCRE_V'.tar.gz'
@@ -424,7 +424,7 @@ if [ "$HESTIA_B" = true ] ; then
 
     # Download and unpack source files
     if [ -z "$use_src_folder" ]; then
-      download_file $HESTIA '-' 'fresh' | tar xz
+      download_file $HESTIA_ARCHIVE_LINK '-' 'fresh' | tar xz
     elif [ -d $SRC_DIR ]; then
       cp -rf "$SRC_DIR/" $BUILD_DIR/hestiacp-$branch
     fi