我最近开始在一家全 Linux 公司担任 IT 人员,并注意到我们所做的一些任务可以“轻松”自动化。今天的自动化任务是/etc/apt/apt.config.d/50unattended-upgrades在新计算机上安装软件和配置。我已经编写了软件安装脚本,但现在我一直坚持取消注释所需的无人值守升级行。
我给你举个例子,这个:
// Automatically upgrade packages from these (origin:archive) pairs
//
// Note that in Ubuntu security updates may pull in new dependencies
// from non-security sources (e.g. chromium). By allowing the release
// pocket these get automatically pulled in.
Unattended-Upgrade::Allowed-Origins {
"${distro_id}:${distro_codename}";
"${distro_id}:${distro_codename}-security";
// Extended Security Maintenance; doesn't necessarily exist for
// every release and this system may not have it installed, but if
// available, the policy for updates is such that …Run Code Online (Sandbox Code Playgroud)