Skip to content

Commit 8b8577d

Browse files
author
Kristan Kenney
authored
Merge pull request hestiacp#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
2 parents 90e10c2 + 98fc3c1 commit 8b8577d

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

bin/v-update-sys-hestia-git

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ HESTIA_B='true'
122122
GIT_REP='https://raw.githubusercontent.com/hestiacp/hestiacp/'$branch'/src/deb'
123123

124124
# Generate Links for sourcecode
125-
HESTIA='https://github.com/hestiacp/hestiacp/archive/'$branch'.zip'
125+
HESTIA_ARCHIVE_LINK='https://github.com/hestiacp/hestiacp/archive/'$branch'.zip'
126126
NGINX='https://nginx.org/download/nginx-'$NGINX_V'.tar.gz'
127127
OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_V'.tar.gz'
128128
PCRE='https://ftp.pcre.org/pub/pcre/pcre-'$PCRE_V'.tar.gz'
@@ -323,7 +323,7 @@ if [ "$HESTIA_B" = true ] ; then
323323
mkdir $BUILD_DIR/hestia_$HESTIA_V
324324

325325
# Download and unpack source files
326-
download_file $HESTIA
326+
download_file $HESTIA_ARCHIVE_LINK
327327
unzip -q $branch.zip
328328
rm $branch.zip
329329

install/deb/nginx/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ http {
114114
ssl_session_tickets off;
115115
ssl_stapling on;
116116
ssl_stapling_verify on;
117-
resolver 1.0.0.1 1.1.1.1 valid=300s;
117+
resolver 1.0.0.1 1.1.1.1 valid=300s ipv6=off;
118118
resolver_timeout 5s;
119119
add_header X-Frame-Options SAMEORIGIN;
120120
add_header X-Content-Type-Options nosniff;

install/hst-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ check_wget_curl(){
9595
# Check for supported operating system before proceeding with download
9696
# of OS-specific installer, and throw error message if unsupported OS detected.
9797
if [[ "$release" =~ ^(8|9|16.04|18.04)$ ]]; then
98-
check_wget_curl
98+
check_wget_curl $*
9999
else
100100
no_support_message
101101
fi

install/upgrade/1.00.0-190618.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
#!/bin/bash
22

3-
# Define variables
4-
export HESTIA="/usr/local/hestia"
5-
export BIN="/usr/local/hestia/bin"
3+
# Define global variables
4+
if [ -z "$HESTIA" ] || [ ! -f "${HESTIA}/conf/hestia.conf"]; then
5+
export HESTIA="/usr/local/hestia"
6+
fi
7+
8+
# Set backup folder
69
HESTIA_BACKUP="/root/hst_upgrade/$(date +%d%m%Y%H%M)"
10+
11+
# Set installation source folder
712
hestiacp="$HESTIA/install/deb"
813

914
# Set phpMyAdmin version for upgrade

src/hst_autocompile.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ fi
175175
GIT_REP='https://raw.githubusercontent.com/hestiacp/hestiacp/'$branch'/src/deb'
176176

177177
# Generate Links for sourcecode
178-
HESTIA='https://github.com/hestiacp/hestiacp/archive/'$branch'.tar.gz'
178+
HESTIA_ARCHIVE_LINK='https://github.com/hestiacp/hestiacp/archive/'$branch'.tar.gz'
179179
NGINX='https://nginx.org/download/nginx-'$NGINX_V'.tar.gz'
180180
OPENSSL='https://www.openssl.org/source/openssl-'$OPENSSL_V'.tar.gz'
181181
PCRE='https://ftp.pcre.org/pub/pcre/pcre-'$PCRE_V'.tar.gz'
@@ -424,7 +424,7 @@ if [ "$HESTIA_B" = true ] ; then
424424

425425
# Download and unpack source files
426426
if [ -z "$use_src_folder" ]; then
427-
download_file $HESTIA '-' 'fresh' | tar xz
427+
download_file $HESTIA_ARCHIVE_LINK '-' 'fresh' | tar xz
428428
elif [ -d $SRC_DIR ]; then
429429
cp -rf "$SRC_DIR/" $BUILD_DIR/hestiacp-$branch
430430
fi

0 commit comments

Comments
 (0)