Skip to content

Commit 7c160f0

Browse files
authored
Merge pull request hestiacp#1253 from hestiacp/fix/2020-10_issue_apt-key_1604
Fix/2020 10 issue apt key 1604
2 parents d00ebc8 + a344452 commit 7c160f0

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

install/hst-install-ubuntu.sh

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,11 @@ echo
562562
if [ "$nginx" = 'yes' ]; then
563563
echo "[ * ] NGINX"
564564
echo "deb [arch=amd64] https://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
565-
apt-key adv --fetch-keys 'https://nginx.org/keys/nginx_signing.key' > /dev/null 2>&1
565+
if [ "$release" = '16.04' ]; then
566+
apt-key adv --fetch-keys 'http://nginx.org/keys/nginx_signing.key' > /dev/null 2>&1
567+
else
568+
apt-key adv --fetch-keys 'https://nginx.org/keys/nginx_signing.key' > /dev/null 2>&1
569+
fi
566570
fi
567571

568572
# Installing sury PHP repo
@@ -579,7 +583,12 @@ fi
579583
if [ "$mysql" = 'yes' ]; then
580584
echo "[ * ] MariaDB"
581585
echo "deb [arch=amd64] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
582-
apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' > /dev/null 2>&1
586+
if [ "$release" = '16.04' ]; then
587+
apt-key adv --fetch-keys 'http://mariadb.org/mariadb_release_signing_key.asc' > /dev/null 2>&1
588+
else
589+
apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' > /dev/null 2>&1
590+
fi
591+
583592
fi
584593

585594
# Installing HestiaCP repo
@@ -591,7 +600,11 @@ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A189E93654F0B0E5 > /dev
591600
if [ "$postgresql" = 'yes' ]; then
592601
echo "[ * ] PostgreSQL"
593602
echo "deb https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
594-
apt-key adv --fetch-keys 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' > /dev/null 2>&1
603+
if [ "$release" = '16.04' ]; then
604+
apt-key adv --fetch-keys 'http://www.postgresql.org/media/keys/ACCC4CF8.asc' > /dev/null 2>&1
605+
else
606+
apt-key adv --fetch-keys 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' > /dev/null 2>&1
607+
fi
595608
fi
596609

597610
# Echo for a new line

0 commit comments

Comments
 (0)