|
686 | 686 | # Define apt conf location |
687 | 687 | apt=/etc/apt/sources.list.d |
688 | 688 |
|
| 689 | +#create new folder if not all-ready exists |
| 690 | +mkdir /root/.gnupg/ |
| 691 | +chmod 600 /root/.gnupg/ |
| 692 | + |
689 | 693 | # Updating system |
690 | 694 | echo "Adding required repositories to proceed with installation:" |
691 | 695 | echo |
692 | 696 |
|
693 | 697 | # Installing Nginx repo |
694 | 698 |
|
695 | 699 | echo "[ * ] NGINX" |
696 | | -echo "deb [arch=$ARCH] https://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list |
697 | | -apt-key adv --fetch-keys 'https://nginx.org/keys/nginx_signing.key' > /dev/null 2>&1 |
| 700 | +echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/nginx-keyring.gpg] https://nginx.org/packages/mainline/$VERSION/ $codename nginx" > $apt/nginx.list |
| 701 | +curl -s https://nginx.org/keys/nginx_signing.key | gpg --dearmor | tee /usr/share/keyrings/nginx-keyring.gpg >/dev/null 2>&1 |
698 | 702 |
|
699 | 703 | # Installing sury PHP repo |
700 | 704 | echo "[ * ] PHP" |
701 | | -echo "deb https://packages.sury.org/php/ $codename main" > $apt/php.list |
702 | | -apt-key adv --fetch-keys 'https://packages.sury.org/php/apt.gpg' > /dev/null 2>&1 |
| 705 | +echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/sury-keyring.gpg] https://packages.sury.org/php/ $codename main" > $apt/php.list |
| 706 | +curl -s https://packages.sury.org/php/apt.gpg | gpg --dearmor | tee /usr/share/keyrings/sury-keyring.gpg >/dev/null 2>&1 |
703 | 707 |
|
704 | 708 | # Installing sury Apache2 repo |
705 | 709 | if [ "$apache" = 'yes' ]; then |
706 | 710 | echo "[ * ] Apache2" |
707 | | - echo "deb https://packages.sury.org/apache2/ $codename main" > $apt/apache2.list |
708 | | - apt-key adv --fetch-keys 'https://packages.sury.org/apache2/apt.gpg' > /dev/null 2>&1 |
| 711 | + echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/apache2-keyring.gpg] https://packages.sury.org/apache2/ $codename main" > $apt/apache2.list |
| 712 | + curl -s https://packages.sury.org/apache2/apt.gpg | gpg --dearmor | tee /usr/share/keyrings/apache2-keyring.gpg >/dev/null 2>&1 |
709 | 713 | fi |
710 | 714 |
|
711 | 715 | # Installing MariaDB repo |
712 | 716 | if [ "$mysql" = 'yes' ]; then |
713 | 717 | echo "[ * ] MariaDB" |
714 | | - echo "deb [arch=$ARCH] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list |
715 | | - apt-key adv --fetch-keys 'https://mariadb.org/mariadb_release_signing_key.asc' > /dev/null 2>&1 |
| 718 | + echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/mariadb-keyring.gpg] https://mirror.mva-n.net/mariadb/repo/$mariadb_v/$VERSION $codename main" > $apt/mariadb.list |
| 719 | + curl -s https://mariadb.org/mariadb_release_signing_key.asc | gpg --dearmor | tee /usr/share/keyrings/mariadb-keyring.gpg >/dev/null 2>&1 |
716 | 720 | fi |
717 | 721 |
|
718 | 722 | # Installing HestiaCP repo |
719 | 723 | echo "[ * ] Hestia Control Panel" |
720 | | -echo "deb [arch=$ARCH] https://$RHOST/ $codename main" > $apt/hestia.list |
721 | | -apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A189E93654F0B0E5 > /dev/null 2>&1 |
| 724 | +echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/hestia-keyring.gpg] https://$RHOST/ $codename main" > $apt/hestia.list |
| 725 | +gpg --no-default-keyring --keyring /usr/share/keyrings/hestia-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys A189E93654F0B0E5 >/dev/null 2>&1 |
722 | 726 |
|
723 | 727 | # Installing PostgreSQL repo |
724 | 728 | if [ "$postgresql" = 'yes' ]; then |
725 | 729 | echo "[ * ] PostgreSQL" |
726 | | - echo "deb [arch=$ARCH] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list |
727 | | - apt-key adv --fetch-keys 'https://www.postgresql.org/media/keys/ACCC4CF8.asc' > /dev/null 2>&1 |
| 730 | + echo "deb [arch=$ARCH signed-by=/usr/share/keyrings/postgresql-keyring.gpg] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" > $apt/postgresql.list |
| 731 | + curl -s https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor | tee /usr/share/keyrings/postgresql-keyring.gpg >/dev/null 2>&1 |
728 | 732 | fi |
729 | 733 |
|
730 | 734 | # Echo for a new line |
|
0 commit comments