更新 upgrade.sh 脚本,修复 needrestart 命令参数并添加帮助信息

This commit is contained in:
mini2024
2025-03-22 16:35:53 +08:00
parent 2a7f18fa64
commit 5fb92ad712

51
debian/upgrade.sh vendored
View File

@ -36,4 +36,53 @@ apt -qq update &&
apt clean &&
systemctl --failed &&
apt -qq install needrestart -y &&
needrestart -q -r a
needrestart -r a
################################################################################
# needrestart --help
# needrestart 3.6 - Restart daemons after library updates.
# Authors:
# Thomas Liske <thomas@fiasko-nw.net>
# Copyright Holder:
# 2013 - 2022 (C) Thomas Liske [http://fiasko-nw.net/~thomas/]
# Upstream:
# https://github.com/liske/needrestart
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# Usage:
# needrestart [-vn] [-c <cfg>] [-r <mode>] [-f <fe>] [-u <ui>] [-bkl]
# -v be more verbose
# -q be quiet
# -m <mode> set detail level
# e (e)asy mode
# a (a)dvanced mode
# -n set default answer to 'no'
# -c <cfg> config filename
# -r <mode> set restart mode
# l (l)ist only
# i (i)nteractive restart
# a (a)utomatically restart
# -b enable batch mode
# -p enable nagios plugin mode
# -f <fe> override debconf frontend (DEBIAN_FRONTEND, debconf(7))
# -t <seconds> tolerate interpreter process start times within this value
# -u <ui> use preferred UI package (-u ? shows available packages)
# By using the following options only the specified checks are performed:
# -k check for obsolete kernel
# -l check for obsolete libraries
# -w check for obsolete CPU microcode
# --help show this help
# --version show version information