Skip to content

Commit 2ff4643

Browse files
committed
Improve key and ssl connection handling of the used repositories
1 parent b27cc66 commit 2ff4643

File tree

4 files changed

+16
-33
lines changed

4 files changed

+16
-33
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
66

77
### Bugfixes
88
- Create mailhelo.conf if it doesnt exist to prevent a error message during grep.
9+
- Improve key and ssl connection handling of the used repositories.
910

1011
## [1.2.1] - Service Release 1 (beta)
1112
### Features

install/hst-install-debian.sh

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -614,39 +614,27 @@ echo
614614
# Installing Nginx repo
615615
if [ "$nginx" = 'yes' ]; then
616616
echo "[ * ] NGINX"
617-
echo "deb [arch=amd64] http://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
618-
wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
619-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/nginx_signing.key > /dev/null 2>&1
617+
echo "deb [arch=amd64] https://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
618+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --fetch-keys 'https://nginx.org/keys/nginx_signing.key' > /dev/null 2>&1
620619
fi
621620

622621
# Installing sury PHP repo
623622
echo "[ * ] PHP"
624623
echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list
625-
wget --quiet https://packages.sury.org/php/apt.gpg -O /tmp/php_signing.key
626-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/php_signing.key > /dev/null 2>&1
624+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' > /dev/null 2>&1
627625

628626
# Installing sury Apache2 repo
629627
if [ "$apache" = 'yes' ]; then
630628
echo "[ * ] Apache2"
631629
echo "deb https://packages.sury.org/apache2/ $codename main" > $apt/apache2.list
632-
wget --quiet https://packages.sury.org/apache2/apt.gpg -O /tmp/apache2_signing.key
633-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/apache2_signing.key > /dev/null 2>&1
630+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --fetch-keys 'https://packages.sury.org/apache2/apt.gpg' > /dev/null 2>&1
634631
fi
635632

636633
# Installing MariaDB repo
637634
if [ "$mysql" = 'yes' ]; then
638635
echo "[ * ] MariaDB"
639-
echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
640-
if [ "$release" -eq 8 ]; then
641-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CBCB082A1BB943DB > /dev/null 2>&1
642-
else
643-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F1656F24C74CD1D8 > /dev/null 2>&1
644-
fi
645-
fi
646-
647-
# Installing Backport repo for Debian 8
648-
if [ "$release" -eq 8 ]; then
649-
echo "deb [check-valid-until=no] http://archive.debian.org/debian jessie-backports main" >> /etc/apt/sources.list
636+
echo "deb [arch=amd64] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
637+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' > /dev/null 2>&1
650638
fi
651639

652640
# Installing HestiaCP repo
@@ -657,10 +645,8 @@ APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver keyserver.ubuntu.
657645
# Installing PostgreSQL repo
658646
if [ "$postgresql" = 'yes' ]; then
659647
echo "[ * ] PostgreSQL"
660-
echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
661-
wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
662-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
663-
rm /tmp/psql_signing.key
648+
echo "deb https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
649+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --fetch-keys 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' > /dev/null 2>&1
664650
fi
665651

666652
# Echo for a new line

install/hst-install-ubuntu.sh

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -589,10 +589,8 @@ echo
589589
# Installing Nginx repo
590590
if [ "$nginx" = 'yes' ]; then
591591
echo "[ * ] NGINX"
592-
echo "deb [arch=amd64] http://nginx.org/packages/mainline/$VERSION/ $codename nginx" \
593-
> $apt/nginx.list
594-
wget --quiet http://nginx.org/keys/nginx_signing.key -O /tmp/nginx_signing.key
595-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/nginx_signing.key > /dev/null 2>&1
592+
echo "deb [arch=amd64] https://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list
593+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --fetch-keys 'https://nginx.org/keys/nginx_signing.key' > /dev/null 2>&1
596594
fi
597595

598596
# Installing sury PHP repo
@@ -608,8 +606,8 @@ fi
608606
# Installing MariaDB repo
609607
if [ "$mysql" = 'yes' ]; then
610608
echo "[ * ] MariaDB"
611-
echo "deb [arch=amd64] http://ams2.mirrors.digitalocean.com/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
612-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 > /dev/null 2>&1
609+
echo "deb [arch=amd64] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list
610+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' > /dev/null 2>&1
613611
fi
614612

615613
# Installing HestiaCP repo
@@ -620,10 +618,8 @@ APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --keyserver keyserver.ubuntu.
620618
# Installing PostgreSQL repo
621619
if [ "$postgresql" = 'yes' ]; then
622620
echo "[ * ] PostgreSQL"
623-
echo "deb http://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
624-
wget --quiet https://www.postgresql.org/media/keys/ACCC4CF8.asc -O /tmp/psql_signing.key
625-
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add /tmp/psql_signing.key > /dev/null 2>&1
626-
rm /tmp/psql_signing.key
621+
echo "deb https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list
622+
APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key adv --fetch-keys 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' > /dev/null 2>&1
627623
fi
628624

629625
# Echo for a new line

install/upgrade/versions/latest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ $BIN/v-update-web-templates
1414
echo "[ ! ] Updating default mail domain templates..."
1515
$BIN/v-update-mail-templates
1616
echo "[ ! ] Updating default DNS zone templates..."
17-
$BIN/v-update-dns-templates
17+
$BIN/v-update-dns-templates

0 commit comments

Comments
 (0)