mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-09-26 14:17:17 +02:00
Use apt_update_safe instead of aborting on a failed apt update (#17462)
This commit is contained in:
committed by
GitHub
parent
ba1409a920
commit
b855a5782a
@@ -25,7 +25,7 @@ Enabled: yes
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -t ${CODENAME}-backports cockpit cracklib-runtime --no-install-recommends -y
|
||||
sed -i "s/root//g" /etc/cockpit/disallowed-users
|
||||
msg_ok "Installed Cockpit"
|
||||
|
||||
@@ -14,7 +14,7 @@ network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get update
|
||||
apt_update_safe
|
||||
$STD apt-get install -y \
|
||||
ssh \
|
||||
software-properties-common
|
||||
|
||||
@@ -21,7 +21,7 @@ setup_deb822_repo \
|
||||
"https://dl.evcc.io/public/evcc/stable/deb/debian/" \
|
||||
"$(get_os_info codename)" \
|
||||
"main"
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
msg_ok "evcc Repository setup sucessfully"
|
||||
|
||||
msg_info "Installing evcc"
|
||||
|
||||
@@ -26,7 +26,7 @@ setup_deb822_repo \
|
||||
"https://dl.google.com/linux/linux_signing_key.pub" \
|
||||
"https://dl.google.com/linux/chrome/deb/" \
|
||||
"stable"
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y google-chrome-stable
|
||||
# remove google-chrome.list added by google-chrome-stable
|
||||
if [ -f /etc/apt/sources.list.d/google-chrome.list ]; then
|
||||
|
||||
@@ -41,7 +41,7 @@ Components: main contrib
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
mv /etc/apt/sources.list /etc/apt/sources.list.bak
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
fi
|
||||
msg_ok "Converted APT sources"
|
||||
|
||||
@@ -128,7 +128,7 @@ if [[ "$(arch_resolve)" == "amd64" ]]; then
|
||||
cp -a /rootfs/. /
|
||||
rm -rf /rootfs
|
||||
rm -f /etc/apt/sources.list.d/intel-gpu-jammy.list /usr/share/keyrings/intel-graphics.gpg
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
ldconfig
|
||||
msg_ok "Built Intel Media Driver"
|
||||
fi
|
||||
|
||||
@@ -17,7 +17,7 @@ DISTRO_CODENAME="$(awk -F= '/^VERSION_CODENAME=/{print $2}' /etc/os-release)"
|
||||
curl -fsSL https://deb.globaleaks.org/globaleaks.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/globaleaks.gpg
|
||||
echo "deb [signed-by=/etc/apt/trusted.gpg.d/globaleaks.gpg] https://deb.globaleaks.org $DISTRO_CODENAME/" >/etc/apt/sources.list.d/globaleaks.list
|
||||
echo 'APPARMOR_SANDBOXING=0' >/etc/default/globaleaks
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold install globaleaks
|
||||
msg_ok "Setup GlobaLeaks"
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ msg_info "Setup Graylog Data Node"
|
||||
PASSWORD_SECRET=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | head -c16)
|
||||
curl -fsSL "https://packages.graylog2.org/repo/packages/graylog-7.0-repository_latest.deb" -o "graylog-7.0-repository_latest.deb"
|
||||
$STD dpkg -i graylog-7.0-repository_latest.deb
|
||||
$STD apt-get update
|
||||
apt_update_safe
|
||||
$STD apt-get install graylog-datanode -y
|
||||
sed -i "s/password_secret =/password_secret = $PASSWORD_SECRET/g" /etc/graylog/datanode/datanode.conf
|
||||
systemctl enable -q --now graylog-datanode
|
||||
|
||||
@@ -125,7 +125,7 @@ msg_ok "Dependencies Installed"
|
||||
msg_info "Installing Mise"
|
||||
curl -fSs https://mise.jdx.dev/gpg-key.pub | tee /etc/apt/keyrings/mise-archive-keyring.pub 1>/dev/null
|
||||
echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.pub arch=$(arch_resolve)] https://mise.jdx.dev/deb stable main" >/etc/apt/sources.list.d/mise.list
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y mise
|
||||
msg_ok "Installed Mise"
|
||||
|
||||
@@ -150,7 +150,7 @@ Package: *
|
||||
Pin:release a=testing
|
||||
Pin-Priority: 450
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
msg_ok "Configured Debian Testing repo"
|
||||
msg_info "Installing packages from Debian Testing repo"
|
||||
$STD apt install -t testing --no-install-recommends -yqq libmimalloc3 libde265-dev
|
||||
|
||||
@@ -19,7 +19,7 @@ msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Adding Kiwix PPA"
|
||||
add-apt-repository -y ppa:kiwixteam/release >>"$(get_active_logfile)" 2>&1
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
msg_ok "Added Kiwix PPA"
|
||||
|
||||
msg_info "Installing Kiwix-Tools"
|
||||
|
||||
@@ -29,7 +29,7 @@ URIs: http://download.opensuse.org/repositories/home:/Masgalor:/LLDAP/${DISTRO}_
|
||||
Suites: /
|
||||
Signed-By: /usr/share/keyrings/home_Masgalor_LLDAP.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y lldap
|
||||
systemctl enable -q --now lldap
|
||||
msg_ok "Installed lldap"
|
||||
|
||||
@@ -46,7 +46,7 @@ msg_ok "Set up PostgreSQL"
|
||||
msg_info "Installing Mattermost"
|
||||
curl -fsSL -o /usr/share/keyrings/mattermost-archive-keyring.gpg https://deb.packages.mattermost.com/pubkey.gpg
|
||||
sh -c 'curl -fsSL https://deb.packages.mattermost.com/repo-setup.sh | sudo bash -s mattermost' >/dev/null
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y mattermost
|
||||
$STD install -C -m 600 -o mattermost -g mattermost /opt/mattermost/config/config.defaults.json /opt/mattermost/config/config.json
|
||||
sed -i -e "/DataSource/c\ \"DataSource\": \"postgres://$DB_USER:$DB_PASS@localhost:5432/$DB_NAME?sslmode=disable&connect_timeout=10\"," \
|
||||
|
||||
@@ -26,7 +26,7 @@ Suites: trixie
|
||||
Components: non-free non-free-firmware
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y unrar
|
||||
rm /etc/apt/sources.list.d/non-free.sources
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
@@ -30,7 +30,7 @@ Components: main
|
||||
Architectures: amd64
|
||||
Signed-By: /usr/share/keyrings/minarca-keyring.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y minarca-server
|
||||
msg_ok "Installed Minarca"
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ $STD apt install -y ffmpeg v4l-utils
|
||||
msg_ok "Installed FFmpeg"
|
||||
|
||||
msg_info "Installing MotionEye"
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD pip install git+https://github.com/motioneye-project/motioneye.git@dev
|
||||
mkdir -p /etc/motioneye
|
||||
chown -R root:root /etc/motioneye
|
||||
|
||||
@@ -21,7 +21,7 @@ Suites: trixie
|
||||
Components: non-free non-free-firmware
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y unrar
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ Components: ${RELEASE_REPO}
|
||||
Signed-By: /usr/share/keyrings/mysql.gpg
|
||||
EOF
|
||||
fi
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
$STD apt install -y \
|
||||
mysql-community-client \
|
||||
|
||||
@@ -19,7 +19,7 @@ JAVA_VERSION="21" setup_java
|
||||
msg_info "Installing Neo4j (patience)"
|
||||
curl -fsSL "https://debian.neo4j.com/neotechnology.gpg.key" | gpg --dearmor -o /etc/apt/keyrings/neotechnology.gpg
|
||||
echo 'deb [signed-by=/etc/apt/keyrings/neotechnology.gpg] https://debian.neo4j.com stable latest' >/etc/apt/sources.list.d/neo4j.list
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y neo4j
|
||||
sed -i '/server.default_listen_address/s/^#//' /etc/neo4j/neo4j.conf
|
||||
systemctl enable -q --now neo4j
|
||||
|
||||
@@ -24,7 +24,7 @@ bookworm | trixie)
|
||||
esac
|
||||
|
||||
msg_info "Installing ntopng"
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y ntopng
|
||||
msg_ok "Installed ntopng"
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ Suites: all
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/oneapi-archive-keyring.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
msg_ok "Set up Intel® Repositories"
|
||||
|
||||
msg_info "Installing Intel® Level Zero"
|
||||
|
||||
@@ -22,7 +22,7 @@ EOF
|
||||
export LANG=C.UTF-8
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
export APT_LISTCHANGES_FRONTEND=none
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
apt -y --auto-remove --show-upgraded --allow-downgrades --allow-change-held-packages --no-install-recommends --option DPkg::Options::="--force-confdef" --option DPkg::Options::="--force-confold" install openmediavault-keyring openmediavault &>/dev/null
|
||||
omv-confdbadm populate &>/dev/null
|
||||
msg_ok "Installed OpenMediaVault"
|
||||
|
||||
@@ -54,7 +54,7 @@ Suites: squeeze
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/onlyoffice.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
msg_ok "GPG Key Added"
|
||||
else
|
||||
msg_error "Failed to download or verify GPG key from $KEY_URL"
|
||||
|
||||
@@ -50,7 +50,7 @@ URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-deb
|
||||
Suites: ./
|
||||
Signed-By: /etc/apt/keyrings/collaboraonline-release-keyring.gpg
|
||||
EOF
|
||||
$STD apt-get update
|
||||
apt_update_safe
|
||||
$STD apt-get install -y coolwsd code-brand
|
||||
systemctl stop coolwsd
|
||||
mkdir -p /etc/systemd/system/coolwsd.service.d
|
||||
|
||||
@@ -75,7 +75,7 @@ Suites: all
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/oneapi-archive-keyring.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
msg_ok "Set up Intel® Repositories"
|
||||
|
||||
msg_info "Installing Intel® Level Zero"
|
||||
|
||||
@@ -23,7 +23,7 @@ Suites: debian
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/openziti.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y openziti-controller openziti-console </dev/null
|
||||
msg_ok "Installed openziti"
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ Suites: jammy
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/openziti.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y ziti-edge-tunnel
|
||||
sed -i '0,/^ExecStart/ { /^ExecStart/ { n; s|^ExecStart.*|ExecStart=/opt/openziti/bin/ziti-edge-tunnel run-host --verbose=${ZITI_VERBOSE} --identity-dir=${ZITI_IDENTITY_DIR}| } }' /usr/lib/systemd/system/ziti-edge-tunnel.service
|
||||
systemctl daemon-reload
|
||||
|
||||
@@ -34,7 +34,7 @@ Suites: $(lsb_release -sc)
|
||||
Components: main
|
||||
Signed-By: /usr/share/keyrings/deb.sury.org-php.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
msg_ok "Added PHP Repository"
|
||||
|
||||
msg_info "Installing PHP"
|
||||
|
||||
@@ -29,7 +29,7 @@ Suites: trixie
|
||||
Components: non-free
|
||||
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y unrar
|
||||
msg_ok "Setup Unrar"
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ URIs: http://deb.debian.org/debian
|
||||
Suites: trixie-backports
|
||||
Components: main
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y \
|
||||
python3-dev python3-babel python3-venv python-is-python3 \
|
||||
uwsgi uwsgi-plugin-python3 \
|
||||
|
||||
@@ -31,7 +31,7 @@ Components: main
|
||||
Architectures: $(arch_resolve)
|
||||
Signed-By: /usr/share/keyrings/clickhouse-keyring.gpg
|
||||
EOF
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
$STD apt install -y clickhouse-server clickhouse-client
|
||||
msg_ok "Setup ClickHouse"
|
||||
|
||||
@@ -30,7 +30,7 @@ done
|
||||
msg_info "Setup Twingate Repository"
|
||||
curl -fsSL "https://packages.twingate.com/apt/gpg.key" | gpg --dearmor -o /usr/share/keyrings/twingate-connector-keyring.gpg
|
||||
echo "deb [signed-by=/usr/share/keyrings/twingate-connector-keyring.gpg] https://packages.twingate.com/apt/ /" >/etc/apt/sources.list.d/twingate.list
|
||||
$STD apt-get update
|
||||
apt_update_safe
|
||||
msg_ok "Setup Twingate Repository"
|
||||
|
||||
msg_info "Setup Twingate Connector"
|
||||
|
||||
@@ -15,7 +15,7 @@ update_os
|
||||
|
||||
setup_deb_based() {
|
||||
msg_info "Installing Valkey"
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y valkey openssl
|
||||
sed -i 's/^bind .*/bind 0.0.0.0/' /etc/valkey/valkey.conf
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ fi
|
||||
|
||||
curl -fsSL "$ZABBIX_DEB_URL" -o /tmp/"$ZABBIX_DEB_FILE"
|
||||
$STD dpkg -i /tmp/"$ZABBIX_DEB_FILE"
|
||||
$STD apt update
|
||||
apt_update_safe
|
||||
$STD apt install -y zabbix-server-pgsql zabbix-frontend-php php8.4-pgsql zabbix-apache-conf zabbix-sql-scripts
|
||||
|
||||
if [[ "$ZABBIX_VERSION" == "7.0" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user