Browse Source

Merge pull request #365 from Lupul/Hotfix-0619

Restrict nginx resolver to ipv4
Installer script hst-install.sh was not passing arguments further
Autocompile script should not overide HESTIA env variable
Kristan Kenney 6 years ago
parent
commit
8b8577dc44

+ 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'
 GIT_REP='https://raw.githubusercontent.com/hestiacp/hestiacp/'$branch'/src/deb'
 
 
 # Generate Links for sourcecode
 # 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'
 NGINX='https://nginx.org/download/nginx-'$NGINX_V'.tar.gz'
 OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_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'
 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
     mkdir $BUILD_DIR/hestia_$HESTIA_V
 
 
     # Download and unpack source files
     # Download and unpack source files
-    download_file $HESTIA
+    download_file $HESTIA_ARCHIVE_LINK
     unzip -q $branch.zip
     unzip -q $branch.zip
     rm $branch.zip
     rm $branch.zip
 
 

+ 1 - 1
install/deb/nginx/nginx.conf

@@ -114,7 +114,7 @@ http {
     ssl_session_tickets off;
     ssl_session_tickets off;
     ssl_stapling        on;
     ssl_stapling        on;
     ssl_stapling_verify on;
     ssl_stapling_verify on;
-    resolver 1.0.0.1 1.1.1.1 valid=300s;
+    resolver 1.0.0.1 1.1.1.1 valid=300s ipv6=off;
     resolver_timeout    5s;
     resolver_timeout    5s;
     add_header          X-Frame-Options SAMEORIGIN;
     add_header          X-Frame-Options SAMEORIGIN;
     add_header          X-Content-Type-Options nosniff;
     add_header          X-Content-Type-Options nosniff;

+ 1 - 1
install/hst-install.sh

@@ -95,7 +95,7 @@ check_wget_curl(){
 # Check for supported operating system before proceeding with download
 # Check for supported operating system before proceeding with download
 # of OS-specific installer, and throw error message if unsupported OS detected.
 # of OS-specific installer, and throw error message if unsupported OS detected.
 if [[ "$release" =~ ^(8|9|16.04|18.04)$ ]]; then
 if [[ "$release" =~ ^(8|9|16.04|18.04)$ ]]; then
-    check_wget_curl
+    check_wget_curl $*
 else
 else
     no_support_message
     no_support_message
 fi
 fi

+ 8 - 3
install/upgrade/1.00.0-190618.sh

@@ -1,9 +1,14 @@
 #!/bin/bash
 #!/bin/bash
 
 
-# Define variables
-export HESTIA="/usr/local/hestia"
-export BIN="/usr/local/hestia/bin"
+# Define global variables
+if [ -z "$HESTIA" ] || [ ! -f "${HESTIA}/conf/hestia.conf"]; then
+    export HESTIA="/usr/local/hestia"
+fi
+
+# Set backup folder
 HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
 HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
+
+# Set installation source folder
 hestiacp="$HESTIA/install/deb"
 hestiacp="$HESTIA/install/deb"
 
 
 # Set phpMyAdmin version for upgrade
 # Set phpMyAdmin version for upgrade

+ 2 - 2
src/hst_autocompile.sh

@@ -175,7 +175,7 @@ fi
 GIT_REP='https://raw.githubusercontent.com/hestiacp/hestiacp/'$branch'/src/deb'
 GIT_REP='https://raw.githubusercontent.com/hestiacp/hestiacp/'$branch'/src/deb'
 
 
 # Generate Links for sourcecode
 # 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'
 NGINX='https://nginx.org/download/nginx-'$NGINX_V'.tar.gz'
 OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_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'
 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
     # Download and unpack source files
     if [ -z "$use_src_folder" ]; then
     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
     elif [ -d $SRC_DIR ]; then
       cp -rf "$SRC_DIR/" $BUILD_DIR/hestiacp-$branch
       cp -rf "$SRC_DIR/" $BUILD_DIR/hestiacp-$branch
     fi
     fi