AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[unattended-upgrades](ubuntu)

Martin Hope
traderdev
Asked: 2022-11-14 01:54:29 +0800 CST

如何检查无人值守升级当前是否正在运行

  • 6

我想知道是否有办法检查无人值守升级当前是否正在执行它的操作(来自 bash 脚本)

我想使用 cron 间隔运行一个脚本,该脚本将定期检查无人值守升级是否正在运行,如果是,则向 webhook 发送通知。

(如果无人值守升级正在运行,则 webhook 的目标将不会尝试在服务器上执行操作)。

提前感谢您的任何想法。

unattended-upgrades
  • 1 个回答
  • 25 Views
Martin Hope
daisy
Asked: 2022-04-11 01:55:23 +0800 CST

内核升级时自动重启

  • 0

我正在使用无人值守升级,我想在升级内核时自动重启。

那可能吗?

unattended-upgrades
  • 2 个回答
  • 183 Views
Martin Hope
Angel115
Asked: 2021-04-24 05:23:10 +0800 CST

apt-daily.timer 和 apt-daily-upgrade.timer 有什么区别

  • 3

我找不到这两个文件之间的区别。

apt-daily.timer和apt-daily-upgrade.timer触发什么?

我的猜测是:

  • apt-daily.timer扳机apt update

和

  • apt-daily-upgrade.timer扳机apt -y upgrade

但我找不到任何地方清楚地写在这些条款中。

unattended-upgrades
  • 2 个回答
  • 1492 Views
Martin Hope
Jleuleu
Asked: 2020-12-07 23:39:27 +0800 CST

如何使用 Canonical Livepatch 配置无人值守升级

  • 2

我在我的服务器上使用无人值守升级来保持它是最新的。我还尝试启用 Canonical Livepatch 以避免重新启动系统。

似乎无人值守升级会在 Livepatch 修补内核之前更新内核。

与 Livepatch 一起运行时,我是否需要以不同方式配置无人值守升级?

unattended-upgrades canonical-livepatch
  • 1 个回答
  • 336 Views
Martin Hope
marcohald
Asked: 2020-12-01 23:56:20 +0800 CST

为什么 Docker 会因无人值守升级而停止

  • 7

无人值守升级后,Docker 守护程序停止并且不会重新启动。
这是正常的吗?
我正在使用 Ubuntu Ubuntu 18.04.5 LTS

Dec 01 06:39:19 systemd[1]: Starting Daily apt upgrade and clean activities...
Dec 01 06:39:26 systemd[1]: Stopping Docker Application Container Engine...
unattended-upgrades 18.04
  • 2 个回答
  • 6414 Views
Martin Hope
tom
Asked: 2020-10-24 02:48:44 +0800 CST

无人值守升级不会升级其他存储库

  • 1

无人值守升级不会升级其他存储库。对于其他软件包,升级确实有效。这是我所做的设置:

> cat  /etc/apt/apt.conf.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 unattended-upgrades
>         // should also install from here by default.
>         "${distro_id}ESMApps:${distro_codename}-apps-security";
>         "${distro_id}ESM:${distro_codename}-infra-security";
>         "${distro_id}:${distro_codename}-updates";
> 
>

和这里:

>  cat /etc/apt/apt.conf.d/20auto-upgrades
> APT::Periodic::Update-Package-Lists "1";
> APT::Periodic::Unattended-Upgrade "1";

但也有一段时间没有更新的包(也有没有保持):

> apt list --upgradable Listing... Done icinga2-bin/icinga-focal
> 2.12.1-1.focal amd64 [upgradable from: 2.12.0-1.focal] icinga2-common/icinga-focal 2.12.1-1.focal all [upgradable from:
> 2.12.0-1.focal] icinga2-doc/icinga-focal 2.12.1-1.focal all [upgradable from: 2.12.0-1.focal] icinga2/icinga-focal 2.12.1-1.focal
> amd64 [upgradable from: 2.12.0-1.focal]

这些包来自一个额外的存储库:

> /etc/apt/sources.list.d# ll total 12 drwxr-xr-x 2 root root 4096 Sep
> 14 08:27 ./ drwxr-xr-x 7 root root 4096 Sep 14 08:27 ../
> -rw-r--r-- 1 root root   57 Sep 14 08:27 icinga-main-focal.list

请让我知道无人值守升级将如何完全工作。

提前致谢。

package-management unattended-upgrades
  • 1 个回答
  • 1281 Views
Martin Hope
Pétur Ingi Egilsson
Asked: 2020-08-27 20:31:52 +0800 CST

“新”未使用的依赖项和未使用的依赖项有什么区别?

  • 5

有什么区别:

  • Remove - New -Unused-Dependencies,和
  • 删除未使用的依赖项,

执行无人值守升级时?

以下清单摘自/etc/apt/apt.conf.d/50unattended-upgradesUbuntu 20.04 上无人值守升级 ( ) 的配置文件。

// Do automatic removal of newly unused dependencies after the upgrade
Unattended-Upgrade::Remove-New-Unused-Dependencies "true";

// Do automatic removal of unused packages after the upgrade
// (equivalent to apt-get autoremove)
//Unattended-Upgrade::Remove-Unused-Dependencies "false";
package-management upgrade dependencies apt unattended-upgrades
  • 1 个回答
  • 461 Views
Martin Hope
0xC0000022L
Asked: 2020-07-13 02:06:06 +0800 CST

Unattended-Upgrade::DevRelease "auto"; 的作用是什么?

  • 4

我想将生产系统(首先通过分期)升级到 20.04。备份和恢复选项已经到位。一切如预期般顺利。我这样做了do-release-upgrade -d,因为我不想等到第一个版本发布 (20.04.1)。

但是,查看所有配置更改(查看差异etckeeper和匹配的组合debsums -ce),我注意到/etc/apt/apt.conf.d/50unattended-upgrades现在有这一行:

Unattended-Upgrade::DevRelease "auto";

之前设置为:

Unattended-Upgrade::DevRelease "false";

所以我想知道这是否符合我想要的配置。我希望能够像以前一样使用unattended-upgrades,但我绝对不想要除了 LTS 版本之外的任何东西。

我查看了、和的手册页apt.conf,但找不到该配置选项的描述。此社区帮助页面也没有列出该选项。AskUbuntu上的这个问题是唯一一个引用这个特定选项的问题,但也没有回答我的问题。apt_preferencesapt-configunattended-upgrade

问:Unattended-Upgrade::DevRelease那么设置为时有什么作用"auto",我在哪里可以找到有关设置及其各自效果的更多信息?

updates apt unattended-upgrades
  • 1 个回答
  • 1065 Views
Martin Hope
SummerRain
Asked: 2020-05-09 23:49:33 +0800 CST

无人值守升级运行时更改的配置文件会发生什么

  • 3

当无人值守升级在我的计算机上安装具有不同配置文件的软件包的新版本时会发生什么?通常你会被问到是要保留你的还是用包装中的那个覆盖它。

configuration unattended-upgrades
  • 1 个回答
  • 488 Views
Martin Hope
Zorglub29
Asked: 2020-02-27 09:38:56 +0800 CST

自动更新

  • 5

我想为一个 linux 经验为 0 并且不想学习更多内容的人设置一台 Ubuntu 笔记本电脑,而不仅仅是使用一些程序(为一位年长的家庭成员替换 Windows;她真的很喜欢 ubuntu,发现它很容易使用,并且活泼:))。

我想确保应用所有更新。我知道(并且已经启用/设置了每天一次的完整更新)unattended-upgrades。但是,我担心如果笔记本电脑大部分使用时间很短并且认真关闭,那么无人看管的东西可能不会应用升级。

  • 这种担心是基于现实吗?是否unattended-upgrades尝试在笔记本电脑打开时立即升级(似乎不是这样,因为apt每次打开它时我仍然安装了很多东西,尽管unattended-upgrades已经设置好了),或者它只在 01.00 每天执行一次am' 或类似的东西,在这种情况下它可能永远不会被调用?

  • 从根 crontab 调用这种脚本(即添加@reboot bash script_update.shto sudo crontab -e)有帮助吗?:

#!/bin/bash

# A little script to:
#   - wait that internet is available
#   - wait for the automatic software update to be finished running
#   - apply the apt-get update and upgrade to the system
# This means that updates are installed automatically without
# asking confirmation. This should be ok for most vanilla uses.
#
# SETUP
#
# set the XX_SET_PATH to the log file
#
# To make it run automatically, put it in crontab:
# sudo crontab -e
# and in the root crontab that gets opened:
# @reboot bash PATH_TO_THE_SCRIPT.sh

function check_online
{
    netcat -z -w 5 8.8.8.8 53 && return 1 || return 0
}

function wait_online
{
    echo "wait to be online"
    declare -i IS_ONLINE=0

    while [ $IS_ONLINE -eq 0 ]; do
        # We're offline. Sleep for a bit, then check again
        sleep 2;
        check_online
        IS_ONLINE=$?
    done

    echo "now online"
}

{
    echo " "
    echo "new reboot"
    date
    whoami
    wait_online
    echo "wait for 20 minutes to make sure no conflicting catch of dpkg lock"
    sleep 1200
    echo "now start update upgrade..."
    apt-get update
    apt-get upgrade -y
    apt-get autoremove
} >> XX_SET_PATH 2>&1

scripts upgrade unattended-upgrades
  • 1 个回答
  • 908 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve