更新 upgrade.sh 脚本,添加配置选项以强制使用默认和旧的配置文件
This commit is contained in:
5
debian/upgrade.sh
vendored
5
debian/upgrade.sh
vendored
@ -15,6 +15,11 @@ apt install -y unattended-upgrades
|
|||||||
# 启用自动更新
|
# 启用自动更新
|
||||||
dpkg-reconfigure -plow unattended-upgrades
|
dpkg-reconfigure -plow unattended-upgrades
|
||||||
|
|
||||||
|
# ARGS_configure=()
|
||||||
|
# ARGS_configure+=("--force-confdef") # 强制使用默认配置。如果有配置文件冲突,它会选择默认选项。
|
||||||
|
# ARGS_configure+=("--force-confold") # 强制保留旧的配置文件。如果有冲突,保留现有版本而不是提示用户选择。
|
||||||
|
# dpkg --configure -a "${ARGS_configure[@]}"
|
||||||
|
|
||||||
# 配置自动更新并在凌晨2点自动重启
|
# 配置自动更新并在凌晨2点自动重启
|
||||||
cat <<EOF | tee /etc/apt/apt.conf.d/50unattended-upgrades
|
cat <<EOF | tee /etc/apt/apt.conf.d/50unattended-upgrades
|
||||||
Unattended-Upgrade::Automatic-Reboot "true";
|
Unattended-Upgrade::Automatic-Reboot "true";
|
||||||
|
Reference in New Issue
Block a user