diff --git a/data/helpers.d/apt b/data/helpers.d/apt index 45e03b3cb..3b4b199d0 100644 --- a/data/helpers.d/apt +++ b/data/helpers.d/apt @@ -436,7 +436,8 @@ ynh_install_extra_repo () { if [ -n "$key" ] then mkdir --parents "/etc/apt/trusted.gpg.d" - wget --quiet "$key" --output-document=- | gpg --dearmor | $wget_append /etc/apt/trusted.gpg.d/$name.gpg > /dev/null + # Timeout option is here to enforce the timeout on dns query and tcp connect (c.f. man wget) + wget --timeout 900 --quiet "$key" --output-document=- | gpg --dearmor | $wget_append /etc/apt/trusted.gpg.d/$name.gpg > /dev/null fi # Update the list of package with the new repo diff --git a/data/helpers.d/utils b/data/helpers.d/utils index bad157fe1..9c2f40618 100644 --- a/data/helpers.d/utils +++ b/data/helpers.d/utils @@ -144,7 +144,8 @@ ynh_setup_source () { then # Use the local source file if it is present cp $local_src $src_filename else # If not, download the source - local out=`wget --no-verbose --output-document=$src_filename $src_url 2>&1` || ynh_print_err --message="$out" + # Timeout option is here to enforce the timeout on dns query and tcp connect (c.f. man wget) + local out=`wget --timeout 900 --no-verbose --output-document=$src_filename $src_url 2>&1` || ynh_print_err --message="$out" fi # Check the control sum