[+] 历史版本兼容
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
APT_OPTIONS="-o Acquire::https::mirrors.martin98.com::Verify-Peer=false -o Acquire::https::mirrors.martin98.com::Verify-Host=false"
|
||||
|
||||
type=$(cat /etc/*release | grep ^ID= | cut -d= -f2)
|
||||
release=$(cat /etc/*release | grep VERSION_CODENAME | cut -d= -f2)
|
||||
components=$([ "${type}" = "debian" ] && echo "main contrib non-free non-free-firmware" || ([ "${type}" = "ubuntu" ] && echo "main restricted universe multiverse"))
|
||||
@@ -31,9 +33,9 @@ else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
|
||||
# 更新证书
|
||||
APT_OPTIONS="-o Acquire::https::mirrors.martin98.com::Verify-Peer=false -o Acquire::https::mirrors.martin98.com::Verify-Host=false"
|
||||
apt update $APT_OPTIONS && apt install $APT_OPTIONS -y ca-certificates && update-ca-certificates
|
||||
apt update $APT_OPTIONS && apt install $APT_OPTIONS -y ca-certificates curl && update-ca-certificates
|
||||
apt update && apt upgrade -y
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user