Skip to content

Commit 0d35f1b

Browse files
committed
[WebApps] Use explicit timeout when downloading packages
1 parent 695144e commit 0d35f1b

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

install/hst-install-debian.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if [ "$release" -eq 8 ]; then
3939
flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
4040
e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
4141
bsdmainutils cron hestia hestia-nginx hestia-php expect libmail-dkim-perl
42-
unrar-free vim-common acl sysstat setpriv"
42+
unrar-free vim-common acl sysstat setpriv ipset"
4343
elif [ "$release" -eq 9 ]; then
4444
software="nginx apache2 apache2-utils apache2-suexec-custom
4545
libapache2-mod-ruid2 libapache2-mod-fcgid libapache2-mod-php$fpm_v
@@ -55,7 +55,7 @@ elif [ "$release" -eq 9 ]; then
5555
flex whois rssh git idn zip sudo bc ftp lsof ntpdate rrdtool quota
5656
e2fslibs bsdutils e2fsprogs curl imagemagick fail2ban dnsutils
5757
bsdmainutils cron hestia hestia-nginx hestia-php expect libmail-dkim-perl
58-
unrar-free vim-common acl sysstat rsyslog setpriv"
58+
unrar-free vim-common acl sysstat rsyslog setpriv ipset"
5959
elif [ "$release" -eq 10 ]; then
6060
software="nginx apache2 apache2-utils apache2-suexec-custom
6161
apache2-suexec-pristine libapache2-mod-fcgid libapache2-mpm-itk
@@ -71,7 +71,7 @@ elif [ "$release" -eq 10 ]; then
7171
flex whois git idn zip sudo bc ftp lsof ntpdate rrdtool quota e2fslibs
7272
bsdutils e2fsprogs curl imagemagick fail2ban dnsutils bsdmainutils cron
7373
hestia hestia-nginx hestia-php expect libmail-dkim-perl unrar-free
74-
vim-common acl sysstat rsyslog util-linux"
74+
vim-common acl sysstat rsyslog util-linux ipset"
7575
fi
7676

7777
# Defining help function
@@ -822,6 +822,7 @@ if [ "$postgresql" = 'no' ]; then
822822
fi
823823
if [ "$iptables" = 'no' ] || [ "$fail2ban" = 'no' ]; then
824824
software=$(echo "$software" | sed -e "s/fail2ban//")
825+
software=$(echo "$software" | sed -e "s/ipset//")
825826
fi
826827
if [ "$phpfpm" = 'yes' ]; then
827828
software=$(echo "$software" | sed -e "s/php$fpm_v-cgi//")

install/hst-install-ubuntu.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
4242
php$fpm_v-xml postgresql postgresql-contrib proftpd-basic quota
4343
roundcube-core roundcube-mysql roundcube-plugins rrdtool rssh spamassassin
4444
sudo hestia hestia-nginx hestia-php vim-common vsftpd whois zip acl sysstat
45-
setpriv libonig5"
45+
setpriv libonig5 ipset"
4646

4747
# Defining help function
4848
help() {
@@ -783,6 +783,7 @@ if [ "$postgresql" = 'no' ]; then
783783
fi
784784
if [ "$iptables" = 'no' ] || [ "$fail2ban" = 'no' ]; then
785785
software=$(echo "$software" | sed -e "s/fail2ban//")
786+
software=$(echo "$software" | sed -e "s/ipset//")
786787
fi
787788
if [ "$phpfpm" = 'yes' ]; then
788789
software=$(echo "$software" | sed -e "s/php$fpm_v-cgi//")

web/src/app/System/HestiaApp.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function downloadUrl(string $src, $path=null, &$result=null)
155155
return false;
156156
}
157157

158-
exec("/usr/bin/wget --tries 3 -nv " . escapeshellarg($src). " -P " . escapeshellarg(self::TMPDIR_DOWNLOADS) . ' 2>&1', $output, $return_var);
158+
exec("/usr/bin/wget --tries 3 --timeout=30 --no-dns-cache -nv " . escapeshellarg($src). " -P " . escapeshellarg(self::TMPDIR_DOWNLOADS) . ' 2>&1', $output, $return_var);
159159
if ($return_var !== 0) {
160160
return false;
161161
}

0 commit comments

Comments
 (0)