diff --git a/install.sh b/install.sh index d4e633a7..9f366bac 100644 --- a/install.sh +++ b/install.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_VERSION="77" +SCRIPT_VERSION="78" SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/install.sh' sudo apt install -y curl wget dirmngr gnupg lsb-release ca-certificates @@ -87,7 +87,7 @@ if [ "$arch" = "x86_64" ]; then else pgarch='arm64' fi -postgresql_repo="deb [arch=${pgarch}] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" +postgresql_repo="deb [arch=${pgarch} signed-by=/etc/apt/keyrings/postgresql-archive-keyring.gpg] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" # prevents logging issues with some VPS providers like Vultr if this is a freshly provisioned instance that hasn't been rebooted yet sudo systemctl restart systemd-journald.service @@ -199,12 +199,13 @@ sudo chown ${USER}:${USER} -R /etc/letsencrypt print_green 'Installing Nginx' -wget -qO - https://nginx.org/packages/keys/nginx_signing.key | sudo apt-key add - +sudo mkdir -p /etc/apt/keyrings + +wget -qO - https://nginx.org/packages/keys/nginx_signing.key | sudo gpg --dearmor -o /etc/apt/keyrings/nginx-archive-keyring.gpg nginxrepo="$( cat </dev/null @@ -252,7 +253,6 @@ done print_green 'Installing NodeJS' -sudo mkdir -p /etc/apt/keyrings curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg NODE_MAJOR=18 echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list @@ -282,7 +282,7 @@ print_green 'Installing postgresql' echo "$postgresql_repo" | sudo tee /etc/apt/sources.list.d/pgdg.list -wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/keyrings/postgresql-archive-keyring.gpg sudo apt update sudo apt install -y postgresql-15 sleep 2 diff --git a/restore.sh b/restore.sh index 88305b36..e91ef26a 100755 --- a/restore.sh +++ b/restore.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_VERSION="52" +SCRIPT_VERSION="53" SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/restore.sh' sudo apt update @@ -86,7 +86,7 @@ if [ "$arch" = "x86_64" ]; then else pgarch='arm64' fi -postgresql_repo="deb [arch=${pgarch}] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" +postgresql_repo="deb [arch=${pgarch} signed-by=/etc/apt/keyrings/postgresql-archive-keyring.gpg] https://apt.postgresql.org/pub/repos/apt/ $codename-pgdg main" if [ ! -f "${1}" ]; then echo -ne "\n${RED}usage: ./restore.sh rmm-backup-xxxx.tar${NC}\n" @@ -133,12 +133,11 @@ sudo npm install -g npm print_green 'Restoring Nginx' -wget -qO - https://nginx.org/packages/keys/nginx_signing.key | sudo apt-key add - +wget -qO - https://nginx.org/packages/keys/nginx_signing.key | sudo gpg --dearmor -o /etc/apt/keyrings/nginx-archive-keyring.gpg nginxrepo="$( cat </dev/null @@ -252,7 +251,7 @@ sudo apt install -y redis git print_green 'Installing postgresql' echo "$postgresql_repo" | sudo tee /etc/apt/sources.list.d/pgdg.list -wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - +wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo gpg --dearmor -o /etc/apt/keyrings/postgresql-archive-keyring.gpg sudo apt update sudo apt install -y postgresql-15 sleep 2 diff --git a/update.sh b/update.sh index 0522d5da..9069fad7 100644 --- a/update.sh +++ b/update.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -SCRIPT_VERSION="147" +SCRIPT_VERSION="148" SCRIPT_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/update.sh' LATEST_SETTINGS_URL='https://raw.githubusercontent.com/amidaware/tacticalrmm/master/api/tacticalrmm/tacticalrmm/settings.py' YELLOW='\033[1;33m' @@ -67,6 +67,10 @@ cls() { printf "\033c" } +if [ ! -d /etc/apt/keyrings ]; then + sudo mkdir -p /etc/apt/keyrings +fi + CHECK_NATS_LIMITNOFILE=$(grep LimitNOFILE /etc/systemd/system/nats.service) if ! [[ $CHECK_NATS_LIMITNOFILE ]]; then @@ -167,12 +171,11 @@ if [ ! -f /etc/apt/sources.list.d/nginx.list ]; then codename=$(lsb_release -sc) nginxrepo="$( cat </dev/null - wget -qO - https://nginx.org/packages/keys/nginx_signing.key | sudo apt-key add - + wget -qO - https://nginx.org/packages/keys/nginx_signing.key | sudo gpg --dearmor -o /etc/apt/keyrings/nginx-archive-keyring.gpg sudo apt update sudo apt install -y nginx fi