Skip to content

Commit cfe0190

Browse files
committed
Fix some small issues, remove screen -dm part.
1 parent e94672b commit cfe0190

File tree

2 files changed

+29
-23
lines changed

2 files changed

+29
-23
lines changed

install/hst-install-debian.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,9 @@ echo "Installation backup directory: $hst_backups"
476476
# Print Log File Path
477477
echo "Installation Log File: $LOG"
478478

479+
# Print new line
480+
echo
481+
479482

480483
#----------------------------------------------------------#
481484
# Checking swap #
@@ -496,13 +499,13 @@ fi
496499
#----------------------------------------------------------#
497500

498501
# Updating system
499-
echo "Upgrade System using apt-get..."
502+
echo -ne "Upgrade System using apt-get... "
500503
apt-get -y upgrade >> $LOG &
501504
BACK_PID=$!
502505

503506
# Check if package installation is done, print a spinner
504507
spin_i=1
505-
while kill -0 $BACK_PID 2> /dev/null ; do
508+
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
506509
printf "\b${spinner:spin_i++%${#spinner}:1}"
507510
sleep 0.5
508511
done
@@ -520,23 +523,23 @@ apt=/etc/apt/sources.list.d
520523
echo "deb http://nginx.org/packages/mainline/$VERSION/ $codename nginx" \
521524
> $apt/nginx.list
522525
wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
523-
screen -dm apt-key add /tmp/nginx_signing.key
526+
apt-key add /tmp/nginx_signing.key
524527

525528
if [ "$multiphp" = 'yes' ] || [ "$phpfpm" = 'yes' ]; then
526529
# Installing sury php repo
527530
echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
528531
wget --quiet https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key >> $LOG
529-
screen -dm apt-key add /tmp/php_signing.key
532+
apt-key add /tmp/php_signing.key
530533
fi
531534

532535
# Installing MariaDB repo
533536
echo "deb http://ams2.mirrors.digitalocean.com/mariadb/repo/10.3/$VERSION $codename main" > $apt/mariadb.list
534-
screen -dm apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
537+
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
535538

536539
# Installing hestia repo
537540
echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
538541
wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
539-
screen -dm apt-key add /tmp/deb_signing.key
542+
apt-key add /tmp/deb_signing.key
540543

541544

542545
#----------------------------------------------------------#
@@ -715,12 +718,12 @@ chmod a+x /usr/sbin/policy-rc.d
715718

716719
# Installing apt packages
717720
echo -ne "\n\nWe will now install HestiaCP and all required packages. The process will take around 10-15 minutes. "
718-
apt-get -y install $software >> $LOG &
721+
apt-get -y -qq install $software >> $LOG &
719722
BACK_PID=$!
720723

721724
# Check if package installation is done, print a spinner
722725
spin_i=1
723-
while kill -0 $BACK_PID 2> /dev/null ; do
726+
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
724727
printf "\b${spinner:spin_i++%${#spinner}:1}"
725728
sleep 0.5
726729
done
@@ -1122,7 +1125,7 @@ if [ "$mysql" = 'yes' ]; then
11221125
mysql_install_db >> $LOG
11231126

11241127
update-rc.d mysql defaults
1125-
service mysql start
1128+
service mysql start >> $LOG
11261129
check_result $? "mariadb start failed"
11271130

11281131
# Securing MariaDB installation
@@ -1303,11 +1306,11 @@ if [ "$clamd" = 'yes' ]; then
13031306
/lib/systemd/system/clamav-daemon.service
13041307
systemctl daemon-reload
13051308
fi
1306-
echo "Updating ClamAV..."
1309+
echo -ne "Updating ClamAV... "
13071310
/usr/bin/freshclam >> $LOG &
13081311
BACK_PID=$!
13091312
spin_i=1
1310-
while kill -0 $BACK_PID 2> /dev/null ; do
1313+
while kill -0 $BACK_PID > /dev/null 2>&1 ; do
13111314
printf "\b${spinner:spin_i++%${#spinner}:1}"
13121315
sleep 0.5
13131316
done

install/hst-install-ubuntu.sh

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,9 @@ echo "Installation backup directory: $hst_backups"
447447
# Print Log File Path
448448
echo "Installation Log File: $LOG"
449449

450+
# Print new line
451+
echo
452+
450453

451454
#----------------------------------------------------------#
452455
# Checking swap #
@@ -467,7 +470,7 @@ fi
467470
#----------------------------------------------------------#
468471

469472
# Updating system
470-
echo -e "Upgrade System using apt-get... "
473+
echo -ne "Upgrade System using apt-get... "
471474
apt-get -y upgrade >> $LOG &
472475
BACK_PID=$!
473476

@@ -491,7 +494,7 @@ apt=/etc/apt/sources.list.d
491494
echo "deb http://nginx.org/packages/mainline/$VERSION/ $codename nginx" \
492495
> $apt/nginx.list
493496
wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
494-
screen -dm apt-key add /tmp/nginx_signing.key
497+
apt-key add /tmp/nginx_signing.key
495498

496499
if [ "$multiphp" = 'yes' ] || [ "$phpfpm" = 'yes' ]; then
497500
# Installing sury php repo
@@ -500,12 +503,12 @@ fi
500503

501504
# Installing MariaDB repo
502505
echo "deb http://ams2.mirrors.digitalocean.com/mariadb/repo/10.3/$VERSION $codename main" > $apt/mariadb.list
503-
screen -dm apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
506+
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
504507

505508
# Installing hestia repo
506509
echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
507510
wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
508-
screen -dm apt-key add /tmp/deb_signing.key
511+
apt-key add /tmp/deb_signing.key
509512

510513

511514
#----------------------------------------------------------#
@@ -681,7 +684,7 @@ chmod a+x /usr/sbin/policy-rc.d
681684

682685
# Installing apt packages
683686
echo -ne "\n\nWe will now install HestiaCP and all required packages. The process will take around 10-15 minutes. "
684-
apt-get -y install $software >> $LOG &
687+
apt-get -y install $software > /dev/null 2>&1 &
685688
BACK_PID=$!
686689

687690
# Check if package installation is done, print a spinner
@@ -778,7 +781,7 @@ ln -s $HESTIA/log /var/log/hestia
778781
chmod 770 $HESTIA/data/sessions
779782

780783
# Generating Hestia configuration
781-
rm -f $HESTIA/conf/hestia.conf 2>/dev/null
784+
rm -f $HESTIA/conf/hestia.conf > /dev/null 2>&1
782785
touch $HESTIA/conf/hestia.conf
783786
chmod 660 $HESTIA/conf/hestia.conf
784787

@@ -883,7 +886,7 @@ sed -i 's/%domain%/It worked!/g' /var/www/index.html
883886
cp -rf $hestiacp/firewall $HESTIA/data/
884887

885888
# Configuring server hostname
886-
$HESTIA/bin/v-change-sys-hostname $servername 2>/dev/null
889+
$HESTIA/bin/v-change-sys-hostname $servername > /dev/null 2>&1
887890

888891
# Generating SSL certificate
889892
$HESTIA/bin/v-generate-ssl-cert $(hostname) $email 'US' 'California' \
@@ -1028,7 +1031,7 @@ fi
10281031
# Configure PHP #
10291032
#----------------------------------------------------------#
10301033

1031-
ZONE=$(timedatectl 2>/dev/null|grep Timezone|awk '{print $2}')
1034+
ZONE=$(timedatectl > /dev/null 2>&1|grep Timezone|awk '{print $2}')
10321035
if [ -z "$ZONE" ]; then
10331036
ZONE='UTC'
10341037
fi
@@ -1088,7 +1091,7 @@ if [ "$mysql" = 'yes' ]; then
10881091
mysql_install_db >> $LOG
10891092

10901093
update-rc.d mysql defaults
1091-
service mysql start
1094+
service mysql start >> $LOG
10921095
check_result $? "mariadb start failed"
10931096

10941097
# Securing MariaDB installation
@@ -1178,7 +1181,7 @@ if [ "$named" = 'yes' ]; then
11781181
chmod 640 /etc/bind/named.conf
11791182
chmod 640 /etc/bind/named.conf.options
11801183
aa-complain /usr/sbin/named > /dev/null 2>&1
1181-
echo "/home/** rwm," >> /etc/apparmor.d/local/usr.sbin.named 2>/dev/null
1184+
echo "/home/** rwm," >> /etc/apparmor.d/local/usr.sbin.named > /dev/null 2>&1
11821185
service apparmor status >> $LOG
11831186
if [ $? -ne 0 ]; then
11841187
service apparmor restart
@@ -1324,7 +1327,7 @@ if [ "$exim" = 'yes' ] && [ "$mysql" = 'yes' ]; then
13241327
fi
13251328

13261329
mysql roundcube < /usr/share/dbconfig-common/data/roundcube/install/mysql
1327-
phpenmod mcrypt 2>/dev/null
1330+
phpenmod mcrypt > /dev/null 2>&1
13281331
if [ "$apache" = 'yes' ]; then
13291332
service apache2 restart
13301333
fi
@@ -1409,7 +1412,7 @@ $HESTIA/bin/v-change-user-shell admin nologin
14091412
$HESTIA/bin/v-change-user-language admin $lang
14101413

14111414
# Configuring system IPs
1412-
$HESTIA/bin/v-update-sys-ip >> $LOG
1415+
$HESTIA/bin/v-update-sys-ip > /dev/null 2>&1
14131416

14141417
# Get main IP
14151418
ip=$(ip addr|grep 'inet '|grep global|head -n1|awk '{print $2}'|cut -f1 -d/)

0 commit comments

Comments
 (0)