Skip to content

Commit cfbd657

Browse files
committed
Add some "progress bar" to installer scripts.
1 parent 4b4b1cf commit cfbd657

File tree

2 files changed

+28
-4
lines changed

2 files changed

+28
-4
lines changed

install/hst-install-debian.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ echo "Installation backup directory: $hst_backups"
476476
echo "Installation Log File: $LOG"
477477

478478
# Printing start message and sleeping for 2 seconds
479-
echo -e "\n\nWe will now install HestiaCP and all required packages. The process will take around 10-15 minutes...\n"
479+
echo -ne "\n\nWe will now install HestiaCP and all required packages. The process will take around 10-15 minutes."
480480
sleep 2
481481

482482

@@ -704,7 +704,19 @@ echo -e '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d
704704
chmod a+x /usr/sbin/policy-rc.d
705705

706706
# Installing apt packages
707-
apt-get -y install $software >> $LOG
707+
apt-get -y install $software >> $LOG &
708+
BACK_PID=$!
709+
710+
# Check if package installation is done
711+
while kill -0 $BACK_PID 2> /dev/null ; do
712+
echo -n "."
713+
sleep 2
714+
done
715+
716+
# Do a blank echo to get the \n back
717+
echo
718+
719+
# Check Installation result
708720
check_result $? "apt-get install failed"
709721

710722
# Restoring autostart policy

install/hst-install-ubuntu.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ echo "Installation backup directory: $hst_backups"
447447
echo "Installation Log File: $LOG"
448448

449449
# Printing start message and sleeping for 2 seconds
450-
echo -e "\n\nWe will now install HestiaCP and all required packages. The process will take around 10-15 minutes...\n"
450+
echo -ne "\n\nWe will now install HestiaCP and all required packages. The process will take around 10-15 minutes."
451451
sleep 2
452452

453453
#----------------------------------------------------------#
@@ -669,7 +669,19 @@ echo -e '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d
669669
chmod a+x /usr/sbin/policy-rc.d
670670

671671
# Installing apt packages
672-
apt-get -y install $software >> $LOG
672+
apt-get -y install $software >> $LOG &
673+
BACK_PID=$!
674+
675+
# Check if package installation is done
676+
while kill -0 $BACK_PID 2> /dev/null ; do
677+
echo -n "."
678+
sleep 2
679+
done
680+
681+
# Do a blank echo to get the \n back
682+
echo
683+
684+
# Check Installation result
673685
check_result $? "apt-get install failed"
674686

675687
# Restoring autostart policy

0 commit comments

Comments
 (0)