@@ -46,6 +46,8 @@ software="apache2 apache2.2-common apache2-suexec-custom apache2-utils
4646 hestia-nginx hestia-php vim-common vsftpd whois zip acl sysstat setpriv
4747 ipset libonig5 libzip5"
4848
49+ installer_dependencies=" apt-transport-https curl dirmngr gnupg wget"
50+
4951# Defining help function
5052help () {
5153 echo " Usage: $0 [OPTIONS]
@@ -292,40 +294,10 @@ apt-get -qq update
292294# Creating backup directory
293295mkdir -p $hst_backups
294296
295- # Checking wget
296- if [ ! -e ' /usr/bin/wget' ]; then
297- echo " [ * ] Installing wget..."
298- apt-get -y install wget >> $LOG
299- check_result $? " Can't install wget"
300- fi
301-
302- # Checking curl
303- if [ ! -e ' /usr/bin/curl' ]; then
304- echo " [ * ] Installing curl..."
305- apt-get -y install curl >> $LOG
306- check_result $? " Can't install curl"
307- fi
308-
309- # Check if apt-transport-https is installed
310- if [ ! -e ' /usr/lib/apt/methods/https' ]; then
311- echo " [ * ] Installing apt-transport-https..."
312- apt-get -y install apt-transport-https >> $LOG
313- check_result $? " Can't install apt-transport-https"
314- fi
315-
316- # Check if apt-add-repository is installed
317- if [ ! -e ' /usr/bin/apt-add-repository' ]; then
318- echo " [ * ] Installing apt-add-repository..."
319- apt-get -y install software-properties-common >> $LOG
320- check_result $? " Can't install software-properties-common"
321- fi
322-
323- # Check if gnupg or gnupg2 is installed
324- if [ ! -e ' /usr/lib/gnupg2' ] || [ ! -e ' /usr/lib/gnupg' ]; then
325- echo " [ * ] Installing gnupg2..."
326- apt-get -y install gnupg2 >> $LOG
327- check_result $? " Can't install gnupg2"
328- fi
297+ # Pre-install packages
298+ echo " [ * ] Installing dependencies..."
299+ apt-get -y install $installer_dependencies >> $LOG
300+ check_result $? " Package installation failed, check log file for more details."
329301
330302# Check repository availability
331303wget --quiet " https://$GPG /deb_signing.key" -O /dev/null
0 commit comments