Skip to content

Commit 3bcd42d

Browse files
committed
Run apt upgrade after adding the repositories instead before.
1 parent a93d021 commit 3bcd42d

File tree

2 files changed

+38
-36
lines changed

2 files changed

+38
-36
lines changed

install/hst-install-debian.sh

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -563,24 +563,6 @@ fi
563563
# Install repository #
564564
#----------------------------------------------------------#
565565

566-
# Updating system
567-
echo -ne "Updating currently installed packages, please wait... "
568-
apt-get -y upgrade >> $LOG &
569-
BACK_PID=$!
570-
571-
# Check if package installation is done, print a spinner
572-
spin_i=1
573-
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
574-
printf "\b${spinner:spin_i++%${#spinner}:1}"
575-
sleep 0.5
576-
done
577-
578-
# Do a blank echo to get the \n back
579-
echo
580-
581-
# Check Installation result
582-
check_result $? 'apt-get upgrade failed'
583-
584566
# Define apt conf location
585567
apt=/etc/apt/sources.list.d
586568

@@ -638,6 +620,25 @@ wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
638620
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/deb_signing.key > /dev/null 2>&1
639621
echo
640622

623+
# Updating system
624+
echo -ne "Updating currently installed packages, please wait... "
625+
apt-get -y upgrade >> $LOG &
626+
BACK_PID=$!
627+
628+
# Check if package installation is done, print a spinner
629+
spin_i=1
630+
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
631+
printf "\b${spinner:spin_i++%${#spinner}:1}"
632+
sleep 0.5
633+
done
634+
635+
# Do a blank echo to get the \n back
636+
echo
637+
638+
# Check Installation result
639+
check_result $? 'apt-get upgrade failed'
640+
641+
641642
#----------------------------------------------------------#
642643
# Backup #
643644
#----------------------------------------------------------#

install/hst-install-ubuntu.sh

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -541,24 +541,6 @@ fi
541541
# Install repository #
542542
#----------------------------------------------------------#
543543

544-
# Updating system
545-
echo -ne "Updating currently installed packages, please wait... "
546-
apt-get -y upgrade >> $LOG &
547-
BACK_PID=$!
548-
549-
# Check if package installation is done, print a spinner
550-
spin_i=1
551-
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
552-
printf "\b${spinner:spin_i++%${#spinner}:1}"
553-
sleep 0.5
554-
done
555-
556-
# Do a blank echo to get the \n back
557-
echo
558-
559-
# Check Installation result
560-
check_result $? 'apt-get upgrade failed'
561-
562544
# Define apt conf location
563545
apt=/etc/apt/sources.list.d
564546

@@ -598,6 +580,25 @@ wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
598580
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/deb_signing.key > /dev/null 2>&1
599581
echo
600582

583+
# Updating system
584+
echo -ne "Updating currently installed packages, please wait... "
585+
apt-get -y upgrade >> $LOG &
586+
BACK_PID=$!
587+
588+
# Check if package installation is done, print a spinner
589+
spin_i=1
590+
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
591+
printf "\b${spinner:spin_i++%${#spinner}:1}"
592+
sleep 0.5
593+
done
594+
595+
# Do a blank echo to get the \n back
596+
echo
597+
598+
# Check Installation result
599+
check_result $? 'apt-get upgrade failed'
600+
601+
601602
#----------------------------------------------------------#
602603
# Backup #
603604
#----------------------------------------------------------#

0 commit comments

Comments
 (0)