這裡是 18.04LTS。
在我的 /etc/apt/apt.conf.d/50unattended-upgrades 中,我有:
Unattended-Upgrade::Automatic-Reboot "true";
同時,/var/run/reboot-required
存在。
當我退出伺服器並再次 ssh 進入時,我可以看到* * * System restart required * * *
.
據我所知,如果需要重新啟動,使用 apt-get 升級軟體包現在應該會觸發立即重新啟動,我知道是這樣的(請參閱上面我認為需要重新啟動的兩個原因)。
但是,我無法觸發自動重新啟動 - 我希望它被觸發,sudo apt-get upgrade
但命令成功成功並且沒有重新啟動發生。
請問我缺什麼?
非常感謝!
/etc/apt/apt.conf.d/20auto-upgrades 的內容:
APT::定期::更新包清單「1」; APT::定期::無人值守-升級 1; APT::定期::下載可升級包「0」; APT::定期::AutocleanInterval "7"; APT::定期::CleanInterval "7"; APT::定期::詳細「0」;
/etc/apt/apt.conf.d/50unattended-upgrades 的內容:Unattended-Upgrade::Automatic-Reboot "true";無人值守升級::自動重啟時間「+0」;
答案1
您需要已經update-notifier-common
安裝。預設情況下,這不會安裝在最小伺服器安裝上