Skip to content

Commit 158b0b9

Browse files
committed
Rewrite the key installation output to dev null/log.
1 parent 5702a4a commit 158b0b9

File tree

2 files changed

+8
-23
lines changed

2 files changed

+8
-23
lines changed

install/hst-install-debian.sh

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -291,13 +291,6 @@ if [ ! -e '/usr/bin/dirmngr' ]; then
291291
check_result $? "Can't install dirmngr"
292292
fi
293293

294-
# Checking screen
295-
if [ ! -e '/usr/bin/screen' ]; then
296-
echo "Install missing screen..."
297-
apt-get -y install screen >> $LOG
298-
check_result $? "Can't install screen"
299-
fi
300-
301294
# Check if apt-transport-https is installed
302295
if [ ! -e '/usr/lib/apt/methods/https' ]; then
303296
echo "Install missing apt-transport-https..."
@@ -519,31 +512,27 @@ check_result $? 'apt-get upgrade failed'
519512
# Define apt conf location
520513
apt=/etc/apt/sources.list.d
521514

522-
# Install Key Notification
523-
echo
524-
echo "Install required repository keys..."
525-
526515
# Installing nginx repo
527516
echo "deb http://nginx.org/packages/mainline/$VERSION/ $codename nginx" \
528517
> $apt/nginx.list
529518
wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
530-
apt-key add /tmp/nginx_signing.key
519+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/nginx_signing.key >> $LOG
531520

532521
if [ "$multiphp" = 'yes' ] || [ "$phpfpm" = 'yes' ]; then
533522
# Installing sury php repo
534523
echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
535-
wget --quiet https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key >> $LOG
536-
apt-key add /tmp/php_signing.key
524+
wget --quiet https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
525+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/php_signing.key >> $LOG
537526
fi
538527

539528
# Installing MariaDB repo
540529
echo "deb http://ams2.mirrors.digitalocean.com/mariadb/repo/10.3/$VERSION $codename main" > $apt/mariadb.list
541-
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
530+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
542531

543532
# Installing hestia repo
544533
echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
545534
wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
546-
apt-key add /tmp/deb_signing.key
535+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/deb_signing.key >> $LOG
547536

548537

549538
#----------------------------------------------------------#

install/hst-install-ubuntu.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -490,15 +490,11 @@ check_result $? 'apt-get upgrade failed'
490490
# Define apt conf location
491491
apt=/etc/apt/sources.list.d
492492

493-
# Install Key Notification
494-
echo
495-
echo "Install required repository keys..."
496-
497493
# Installing nginx repo
498494
echo "deb http://nginx.org/packages/mainline/$VERSION/ $codename nginx" \
499495
> $apt/nginx.list
500496
wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
501-
apt-key add /tmp/nginx_signing.key
497+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/nginx_signing.key >> $LOG
502498

503499
if [ "$multiphp" = 'yes' ] || [ "$phpfpm" = 'yes' ]; then
504500
# Installing sury php repo
@@ -507,12 +503,12 @@ fi
507503

508504
# Installing MariaDB repo
509505
echo "deb http://ams2.mirrors.digitalocean.com/mariadb/repo/10.3/$VERSION $codename main" > $apt/mariadb.list
510-
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8
506+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
511507

512508
# Installing hestia repo
513509
echo "deb https://$RHOST/ $codename main" > $apt/hestia.list
514510
wget --quiet https://gpg.hestiacp.com/deb_signing.key -O /tmp/deb_signing.key
515-
apt-key add /tmp/deb_signing.key
511+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/deb_signing.key >> $LOG
516512

517513

518514
#----------------------------------------------------------#

0 commit comments

Comments
 (0)