From 15859dc7f3f8219194ddb362013477bb11627390 Mon Sep 17 00:00:00 2001 From: penguinehis Date: Thu, 14 May 2026 14:33:40 -0300 Subject: [PATCH] Fix apt --- install.sh | 10 +++++----- update.sh | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index b234a62..cfdbcaf 100644 --- a/install.sh +++ b/install.sh @@ -68,8 +68,8 @@ fi case "$OS_ID" in ubuntu|debian|linuxmint) - PKG_UPDATE="apt-get update -qq" - PKG_INSTALL="DEBIAN_FRONTEND=noninteractive apt-get install -y" + PKG_UPDATE="apt update -qq" + PKG_INSTALL="DEBIAN_FRONTEND=noninteractive apt install -y" PKG_DEPS="curl wget git rsync build-essential postgresql postgresql-contrib ca-certificates unzip openssh-client openssl iptables nftables" ;; centos|rhel|rocky|almalinux) @@ -83,9 +83,9 @@ case "$OS_ID" in PKG_DEPS="curl wget git rsync gcc make postgresql-server postgresql-contrib ca-certificates unzip openssh-clients openssl iptables nftables" ;; *) - warn "Unknown OS '$OS_ID' — attempting apt-get…" - PKG_UPDATE="apt-get update -qq" - PKG_INSTALL="DEBIAN_FRONTEND=noninteractive apt-get install -y" + warn "Unknown OS '$OS_ID' — attempting apt…" + PKG_UPDATE="apt update -qq" + PKG_INSTALL="DEBIAN_FRONTEND=noninteractive apt install -y" PKG_DEPS="curl wget git rsync build-essential postgresql postgresql-contrib ca-certificates unzip openssh-client openssl iptables nftables" ;; esac diff --git a/update.sh b/update.sh index fe97faa..f89f111 100644 --- a/update.sh +++ b/update.sh @@ -84,9 +84,9 @@ install_git_if_missing() { return 0 fi warn "git is not installed. Trying to install it..." - if command -v apt-get >/dev/null 2>&1; then - apt-get update -qq - DEBIAN_FRONTEND=noninteractive apt-get install -y git ca-certificates + if command -v apt >/dev/null 2>&1; then + apt update -qq + DEBIAN_FRONTEND=noninteractive apt install -y git ca-certificates elif command -v dnf >/dev/null 2>&1; then dnf install -y git ca-certificates elif command -v yum >/dev/null 2>&1; then @@ -458,9 +458,9 @@ info "[0/7] Pre-flight checks..." need_cmd python3 if ! command -v rsync >/dev/null 2>&1; then warn "rsync is not installed. Trying to install it..." - if command -v apt-get >/dev/null 2>&1; then - apt-get update -qq - DEBIAN_FRONTEND=noninteractive apt-get install -y rsync + if command -v apt >/dev/null 2>&1; then + apt update -qq + DEBIAN_FRONTEND=noninteractive apt install -y rsync elif command -v dnf >/dev/null 2>&1; then dnf install -y rsync elif command -v yum >/dev/null 2>&1; then