diff --git a/PVE系统调整.md b/PVE系统调整.md index 9dff6aa..ccb6e99 100644 --- a/PVE系统调整.md +++ b/PVE系统调整.md @@ -240,7 +240,7 @@ Creating config file /etc/apt/apt.conf.d/20auto-upgrades with new version 执行命令后,使用“左右”方向键进行选择,“回车”键进行确认。 -然后开始调整 apt 的 20auto-upgrades 配置文件: +然后开始调整 apt 的 `20auto-upgrades` 配置文件: ```bash ## 进入 apt 的配置目录 @@ -290,4 +290,48 @@ Unattended-Upgrade::Automatic-Reboot-Time "05:00"; - 自动重启:开启。 - 自动重启时间:05:00。 -因为该配置文件很长,教程中留下一份 PVE 7.2 中配置好的配置文件 [Fox_PVE_50unattended_Upgrades.conf](https://gitee.com/callmer/pve_toss_notes/blob/master/src/Fox_PVE_50unattended_Upgrades.conf),以便对比。 \ No newline at end of file +因为该配置文件很长,教程中留下一份 PVE 7.2 中配置好的配置文件 [Fox_PVE_50unattended_Upgrades.conf](https://gitee.com/callmer/pve_toss_notes/blob/master/src/Fox_PVE_50unattended_Upgrades.conf),以便对比。 + +仔细再仔细确认无误后,`esc` 键退出编辑模式,`:wq` 命令保存退出。 + +### 5.3.重设自动更新触发器 + +```bash +## 重设自动更新触发器时间为凌晨02:00 +systemctl edit apt-daily-upgrade.timer + +## 根据文件中的提示,在中间空白处填入以下内容 +[Timer] +OnCalendar= +OnCalendar=02:00 +RandomizedDelaySec=0 +``` + +完整的配置文件可查看 [Fox_PVE_Apt_Daily_Upgrade.conf](https://gitee.com/callmer/pve_toss_notes/blob/master/src/Fox_PVE_Apt_Daily_Upgrade.conf),以便对比。 + +设置完成后重启自动更新的触发器: + +```bash +## 重启触发器 +systemctl restart apt-daily-upgrade.timer + +## 再次检查触发器状态 +systemctl status apt-daily-upgrade.timer + +## 参考输出 +● apt-daily-upgrade.timer - Daily apt upgrade and clean activities + Loaded: loaded (/lib/systemd/system/apt-daily-upgrade.timer; enabled; vendor preset: enabled) + Drop-In: /etc/systemd/system/apt-daily-upgrade.timer.d + └─override.conf + Active: active (waiting) since Wed 2022-07-20 17:36:40 CST; 11s ago + Trigger: Thu 2022-07-21 02:00:00 CST; 8h left + Triggers: ● apt-daily-upgrade.service + +Jul 20 17:36:40 hyper systemd[1]: Stopped Daily apt upgrade and clean activities. +Jul 20 17:36:40 hyper systemd[1]: Stopping Daily apt upgrade and clean activities. +Jul 20 17:36:40 hyper systemd[1]: Started Daily apt upgrade and clean activities. +``` + +至此 PVE 的系统调整已经完成,重启设备后,可以愉快使用了。 + +Plug in & Forget :) \ No newline at end of file