From 9386f961d1feb793562d5874e9857a3e9eac9d08 Mon Sep 17 00:00:00 2001 From: CallMeR <9463297+callmer@user.noreply.gitee.com> Date: Sun, 29 Oct 2023 10:28:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B4=E7=90=86=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 03.PVE系统调整.md | 4 +- 05.PVE制作虚拟机模板.md | 2 +- src/{ => debian}/debian_20auto_upgrades.conf | 0 .../debian_50unattended_upgrades.conf | 354 ++++++++--------- src/{ => debian}/debian_99_sysctl.conf | 50 +-- src/debian/debian_dnsmasq.conf | 46 +++ src/debian/debian_dnsmasq_smartdns.conf | 52 +++ src/{ => debian}/debian_smartdns.conf | 0 src/{ => debian}/debian_sources.conf | 0 src/{ => pve}/pve_20auto_upgrades.conf | 10 +- src/{ => pve}/pve_50unattended_upgrades.conf | 358 +++++++++--------- src/{ => pve}/pve_apt_daily_upgrade.conf | 46 +-- src/{ => pve}/pve_cpufrequtils.conf | 202 +++++----- src/{ => pve}/pve_cpupower.conf | 0 src/{ => pve}/pve_cpupower_service.conf | 0 15 files changed, 611 insertions(+), 513 deletions(-) rename src/{ => debian}/debian_20auto_upgrades.conf (100%) rename src/{ => debian}/debian_50unattended_upgrades.conf (97%) rename src/{ => debian}/debian_99_sysctl.conf (95%) create mode 100644 src/debian/debian_dnsmasq.conf create mode 100644 src/debian/debian_dnsmasq_smartdns.conf rename src/{ => debian}/debian_smartdns.conf (100%) rename src/{ => debian}/debian_sources.conf (100%) rename src/{ => pve}/pve_20auto_upgrades.conf (96%) rename src/{ => pve}/pve_50unattended_upgrades.conf (97%) rename src/{ => pve}/pve_apt_daily_upgrade.conf (95%) rename src/{ => pve}/pve_cpufrequtils.conf (96%) rename src/{ => pve}/pve_cpupower.conf (100%) rename src/{ => pve}/pve_cpupower_service.conf (100%) diff --git a/03.PVE系统调整.md b/03.PVE系统调整.md index d8e4e4e..b8751fc 100644 --- a/03.PVE系统调整.md +++ b/03.PVE系统调整.md @@ -349,7 +349,7 @@ $ nano /etc/apt/apt.conf.d/50unattended-upgrades - 自动重启时间:`02:30` 。 -因为该配置文件很长,完整的配置文件可查看 [pve_50unattended_upgrades.conf](./src/pve_50unattended_upgrades.conf) 以便对比。 +因为该配置文件很长,完整的配置文件可查看 [pve_50unattended_upgrades.conf](./src/pve/pve_50unattended_upgrades.conf) 以便对比。 ```bash ## 删除以下行前面的注释符 // ,代表启用 @@ -384,7 +384,7 @@ Unattended-Upgrade::Automatic-Reboot-Time "02:30"; 系统自动更新配置文件修改完成后,需要重设自动更新定时器,执行以下命令。 -完整的配置文件可查看 [pve_apt_daily_upgrade.conf](./src/pve_apt_daily_upgrade.conf) 以便对比。 +完整的配置文件可查看 [pve_apt_daily_upgrade.conf](./src/pve/pve_apt_daily_upgrade.conf) 以便对比。 ```bash ## 配置系统定时器 diff --git a/05.PVE制作虚拟机模板.md b/05.PVE制作虚拟机模板.md index c84c060..10c7f8c 100644 --- a/05.PVE制作虚拟机模板.md +++ b/05.PVE制作虚拟机模板.md @@ -335,7 +335,7 @@ $ sudo nvim /etc/apt/apt.conf.d/50unattended-upgrades 根据 “注释” 中相关说明,调整配置文件。 -因为该配置文件很长,完整的配置文件可查看 [debian_50unattended_upgrades.conf](./src/debian_50unattended_upgrades.conf) 以便对比。 +因为该配置文件很长,完整的配置文件可查看 [debian_50unattended_upgrades.conf](./src/debian/debian_50unattended_upgrades.conf) 以便对比。 ```bash ## 删除以下行前面的注释符 // ,代表启用 diff --git a/src/debian_20auto_upgrades.conf b/src/debian/debian_20auto_upgrades.conf similarity index 100% rename from src/debian_20auto_upgrades.conf rename to src/debian/debian_20auto_upgrades.conf diff --git a/src/debian_50unattended_upgrades.conf b/src/debian/debian_50unattended_upgrades.conf similarity index 97% rename from src/debian_50unattended_upgrades.conf rename to src/debian/debian_50unattended_upgrades.conf index 9527088..1880569 100644 --- a/src/debian_50unattended_upgrades.conf +++ b/src/debian/debian_50unattended_upgrades.conf @@ -1,177 +1,177 @@ -// Unattended-Upgrade::Origins-Pattern controls which packages are -// upgraded. -// -// Lines below have the format "keyword=value,...". A -// package will be upgraded only if the values in its metadata match -// all the supplied keywords in a line. (In other words, omitted -// keywords are wild cards.) The keywords originate from the Release -// file, but several aliases are accepted. The accepted keywords are: -// a,archive,suite (eg, "stable") -// c,component (eg, "main", "contrib", "non-free") -// l,label (eg, "Debian", "Debian-Security") -// o,origin (eg, "Debian", "Unofficial Multimedia Packages") -// n,codename (eg, "jessie", "jessie-updates") -// site (eg, "http.debian.net") -// The available values on the system are printed by the command -// "apt-cache policy", and can be debugged by running -// "unattended-upgrades -d" and looking at the log file. -// -// Within lines unattended-upgrades allows 2 macros whose values are -// derived from /etc/debian_version: -// ${distro_id} Installed origin. -// ${distro_codename} Installed codename (eg, "buster") -Unattended-Upgrade::Origins-Pattern { - // Codename based matching: - // This will follow the migration of a release through different - // archives (e.g. from testing to stable and later oldstable). - // Software will be the latest available for the named release, - // but the Debian release itself will not be automatically upgraded. - "origin=Debian,codename=${distro_codename}-updates"; -// "origin=Debian,codename=${distro_codename}-proposed-updates"; - "origin=Debian,codename=${distro_codename},label=Debian"; - "origin=Debian,codename=${distro_codename},label=Debian-Security"; - "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; - - // Archive or Suite based matching: - // Note that this will silently match a different release after - // migration to the specified archive (e.g. testing becomes the - // new stable). -// "o=Debian,a=stable"; -// "o=Debian,a=stable-updates"; -// "o=Debian,a=proposed-updates"; -// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports"; -}; - -// Python regular expressions, matching packages to exclude from upgrading -Unattended-Upgrade::Package-Blacklist { - // The following matches all packages starting with linux- -// "linux-"; - - // Use $ to explicitely define the end of a package name. Without - // the $, "libc6" would match all of them. -// "libc6$"; -// "libc6-dev$"; -// "libc6-i686$"; - - // Special characters need escaping -// "libstdc\+\+6$"; - - // The following matches packages like xen-system-amd64, xen-utils-4.1, - // xenstore-utils and libxenstore3.0 -// "(lib)?xen(store)?"; - - // For more information about Python regular expressions, see - // https://docs.python.org/3/howto/regex.html -}; - -// This option allows you to control if on a unclean dpkg exit -// unattended-upgrades will automatically run -// dpkg --force-confold --configure -a -// The default is true, to ensure updates keep getting installed -//Unattended-Upgrade::AutoFixInterruptedDpkg "true"; - -// Split the upgrade into the smallest possible chunks so that -// they can be interrupted with SIGTERM. This makes the upgrade -// a bit slower but it has the benefit that shutdown while a upgrade -// is running is possible (with a small delay) -//Unattended-Upgrade::MinimalSteps "true"; - -// Install all updates when the machine is shutting down -// instead of doing it in the background while the machine is running. -// This will (obviously) make shutdown slower. -// Unattended-upgrades increases logind's InhibitDelayMaxSec to 30s. -// This allows more time for unattended-upgrades to shut down gracefully -// or even install a few packages in InstallOnShutdown mode, but is still a -// big step back from the 30 minutes allowed for InstallOnShutdown previously. -// Users enabling InstallOnShutdown mode are advised to increase -// InhibitDelayMaxSec even further, possibly to 30 minutes. -//Unattended-Upgrade::InstallOnShutdown "false"; - -// Send email to this address for problems or packages upgrades -// If empty or unset then no email is sent, make sure that you -// have a working mail setup on your system. A package that provides -// 'mailx' must be installed. E.g. "user@example.com" -//Unattended-Upgrade::Mail ""; - -// Set this value to one of: -// "always", "only-on-error" or "on-change" -// If this is not set, then any legacy MailOnlyOnError (boolean) value -// is used to chose between "only-on-error" and "on-change" -//Unattended-Upgrade::MailReport "on-change"; - -// Remove unused automatically installed kernel-related packages -// (kernel images, kernel headers and kernel version locked tools). -//Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; - -// 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"; - -// Automatically reboot *WITHOUT CONFIRMATION* if -// the file /var/run/reboot-required is found after the upgrade -//Unattended-Upgrade::Automatic-Reboot "false"; - -// Automatically reboot even if there are users currently logged in -// when Unattended-Upgrade::Automatic-Reboot is set to true -//Unattended-Upgrade::Automatic-Reboot-WithUsers "true"; - -// If automatic reboot is enabled and needed, reboot at the specific -// time instead of immediately -// Default: "now" -//Unattended-Upgrade::Automatic-Reboot-Time "02:00"; - -// Use apt bandwidth limit feature, this example limits the download -// speed to 70kb/sec -//Acquire::http::Dl-Limit "70"; - -// Enable logging to syslog. Default is False -// Unattended-Upgrade::SyslogEnable "false"; - -// Specify syslog facility. Default is daemon -// Unattended-Upgrade::SyslogFacility "daemon"; - -// Download and install upgrades only on AC power -// (i.e. skip or gracefully stop updates on battery) -// Unattended-Upgrade::OnlyOnACPower "true"; - -// Download and install upgrades only on non-metered connection -// (i.e. skip or gracefully stop updates on a metered connection) -// Unattended-Upgrade::Skip-Updates-On-Metered-Connections "true"; - -// Verbose logging -// Unattended-Upgrade::Verbose "false"; - -// Print debugging information both in unattended-upgrades and -// in unattended-upgrade-shutdown -// Unattended-Upgrade::Debug "false"; - -// Allow package downgrade if Pin-Priority exceeds 1000 -// Unattended-Upgrade::Allow-downgrade "false"; - -// When APT fails to mark a package to be upgraded or installed try adjusting -// candidates of related packages to help APT's resolver in finding a solution -// where the package can be upgraded or installed. -// This is a workaround until APT's resolver is fixed to always find a -// solution if it exists. (See Debian bug #711128.) -// The fallback is enabled by default, except on Debian's sid release because -// uninstallable packages are frequent there. -// Disabling the fallback speeds up unattended-upgrades when there are -// uninstallable packages at the expense of rarely keeping back packages which -// could be upgraded or installed. -// Unattended-Upgrade::Allow-APT-Mark-Fallback "true"; - -Unattended-Upgrade::AutoFixInterruptedDpkg "true"; - -Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; - -Unattended-Upgrade::Remove-New-Unused-Dependencies "true"; - -Unattended-Upgrade::Remove-Unused-Dependencies "true"; - -Unattended-Upgrade::Automatic-Reboot "true"; - -Unattended-Upgrade::Automatic-Reboot-Time "03:00"; - +// Unattended-Upgrade::Origins-Pattern controls which packages are +// upgraded. +// +// Lines below have the format "keyword=value,...". A +// package will be upgraded only if the values in its metadata match +// all the supplied keywords in a line. (In other words, omitted +// keywords are wild cards.) The keywords originate from the Release +// file, but several aliases are accepted. The accepted keywords are: +// a,archive,suite (eg, "stable") +// c,component (eg, "main", "contrib", "non-free") +// l,label (eg, "Debian", "Debian-Security") +// o,origin (eg, "Debian", "Unofficial Multimedia Packages") +// n,codename (eg, "jessie", "jessie-updates") +// site (eg, "http.debian.net") +// The available values on the system are printed by the command +// "apt-cache policy", and can be debugged by running +// "unattended-upgrades -d" and looking at the log file. +// +// Within lines unattended-upgrades allows 2 macros whose values are +// derived from /etc/debian_version: +// ${distro_id} Installed origin. +// ${distro_codename} Installed codename (eg, "buster") +Unattended-Upgrade::Origins-Pattern { + // Codename based matching: + // This will follow the migration of a release through different + // archives (e.g. from testing to stable and later oldstable). + // Software will be the latest available for the named release, + // but the Debian release itself will not be automatically upgraded. + "origin=Debian,codename=${distro_codename}-updates"; +// "origin=Debian,codename=${distro_codename}-proposed-updates"; + "origin=Debian,codename=${distro_codename},label=Debian"; + "origin=Debian,codename=${distro_codename},label=Debian-Security"; + "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; + + // Archive or Suite based matching: + // Note that this will silently match a different release after + // migration to the specified archive (e.g. testing becomes the + // new stable). +// "o=Debian,a=stable"; +// "o=Debian,a=stable-updates"; +// "o=Debian,a=proposed-updates"; +// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports"; +}; + +// Python regular expressions, matching packages to exclude from upgrading +Unattended-Upgrade::Package-Blacklist { + // The following matches all packages starting with linux- +// "linux-"; + + // Use $ to explicitely define the end of a package name. Without + // the $, "libc6" would match all of them. +// "libc6$"; +// "libc6-dev$"; +// "libc6-i686$"; + + // Special characters need escaping +// "libstdc\+\+6$"; + + // The following matches packages like xen-system-amd64, xen-utils-4.1, + // xenstore-utils and libxenstore3.0 +// "(lib)?xen(store)?"; + + // For more information about Python regular expressions, see + // https://docs.python.org/3/howto/regex.html +}; + +// This option allows you to control if on a unclean dpkg exit +// unattended-upgrades will automatically run +// dpkg --force-confold --configure -a +// The default is true, to ensure updates keep getting installed +//Unattended-Upgrade::AutoFixInterruptedDpkg "true"; + +// Split the upgrade into the smallest possible chunks so that +// they can be interrupted with SIGTERM. This makes the upgrade +// a bit slower but it has the benefit that shutdown while a upgrade +// is running is possible (with a small delay) +//Unattended-Upgrade::MinimalSteps "true"; + +// Install all updates when the machine is shutting down +// instead of doing it in the background while the machine is running. +// This will (obviously) make shutdown slower. +// Unattended-upgrades increases logind's InhibitDelayMaxSec to 30s. +// This allows more time for unattended-upgrades to shut down gracefully +// or even install a few packages in InstallOnShutdown mode, but is still a +// big step back from the 30 minutes allowed for InstallOnShutdown previously. +// Users enabling InstallOnShutdown mode are advised to increase +// InhibitDelayMaxSec even further, possibly to 30 minutes. +//Unattended-Upgrade::InstallOnShutdown "false"; + +// Send email to this address for problems or packages upgrades +// If empty or unset then no email is sent, make sure that you +// have a working mail setup on your system. A package that provides +// 'mailx' must be installed. E.g. "user@example.com" +//Unattended-Upgrade::Mail ""; + +// Set this value to one of: +// "always", "only-on-error" or "on-change" +// If this is not set, then any legacy MailOnlyOnError (boolean) value +// is used to chose between "only-on-error" and "on-change" +//Unattended-Upgrade::MailReport "on-change"; + +// Remove unused automatically installed kernel-related packages +// (kernel images, kernel headers and kernel version locked tools). +//Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; + +// 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"; + +// Automatically reboot *WITHOUT CONFIRMATION* if +// the file /var/run/reboot-required is found after the upgrade +//Unattended-Upgrade::Automatic-Reboot "false"; + +// Automatically reboot even if there are users currently logged in +// when Unattended-Upgrade::Automatic-Reboot is set to true +//Unattended-Upgrade::Automatic-Reboot-WithUsers "true"; + +// If automatic reboot is enabled and needed, reboot at the specific +// time instead of immediately +// Default: "now" +//Unattended-Upgrade::Automatic-Reboot-Time "02:00"; + +// Use apt bandwidth limit feature, this example limits the download +// speed to 70kb/sec +//Acquire::http::Dl-Limit "70"; + +// Enable logging to syslog. Default is False +// Unattended-Upgrade::SyslogEnable "false"; + +// Specify syslog facility. Default is daemon +// Unattended-Upgrade::SyslogFacility "daemon"; + +// Download and install upgrades only on AC power +// (i.e. skip or gracefully stop updates on battery) +// Unattended-Upgrade::OnlyOnACPower "true"; + +// Download and install upgrades only on non-metered connection +// (i.e. skip or gracefully stop updates on a metered connection) +// Unattended-Upgrade::Skip-Updates-On-Metered-Connections "true"; + +// Verbose logging +// Unattended-Upgrade::Verbose "false"; + +// Print debugging information both in unattended-upgrades and +// in unattended-upgrade-shutdown +// Unattended-Upgrade::Debug "false"; + +// Allow package downgrade if Pin-Priority exceeds 1000 +// Unattended-Upgrade::Allow-downgrade "false"; + +// When APT fails to mark a package to be upgraded or installed try adjusting +// candidates of related packages to help APT's resolver in finding a solution +// where the package can be upgraded or installed. +// This is a workaround until APT's resolver is fixed to always find a +// solution if it exists. (See Debian bug #711128.) +// The fallback is enabled by default, except on Debian's sid release because +// uninstallable packages are frequent there. +// Disabling the fallback speeds up unattended-upgrades when there are +// uninstallable packages at the expense of rarely keeping back packages which +// could be upgraded or installed. +// Unattended-Upgrade::Allow-APT-Mark-Fallback "true"; + +Unattended-Upgrade::AutoFixInterruptedDpkg "true"; + +Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; + +Unattended-Upgrade::Remove-New-Unused-Dependencies "true"; + +Unattended-Upgrade::Remove-Unused-Dependencies "true"; + +Unattended-Upgrade::Automatic-Reboot "true"; + +Unattended-Upgrade::Automatic-Reboot-Time "03:00"; + diff --git a/src/debian_99_sysctl.conf b/src/debian/debian_99_sysctl.conf similarity index 95% rename from src/debian_99_sysctl.conf rename to src/debian/debian_99_sysctl.conf index 64027d1..72d5ede 100644 --- a/src/debian_99_sysctl.conf +++ b/src/debian/debian_99_sysctl.conf @@ -1,25 +1,25 @@ -# This configuration file is customized by fox -# Optimize system parameters - -kernel.panic = 20 -kernel.panic_on_oops = 1 - -net.core.default_qdisc = fq -net.ipv4.tcp_congestion_control = bbr - -# Other adjustable system parameters - -net.ipv4.conf.all.log_martians = 1 - -net.ipv4.igmp_max_memberships = 100 - -net.ipv4.tcp_challenge_ack_limit = 1000 -net.ipv4.tcp_fin_timeout = 30 -net.ipv4.tcp_keepalive_time = 120 -net.ipv4.tcp_max_orphans = 4096 -net.ipv4.tcp_max_tw_buckets = 4096 -net.ipv4.tcp_syncookies = 1 - -net.ipv6.conf.all.use_tempaddr = 0 -net.ipv6.conf.default.use_tempaddr = 0 - +# This configuration file is customized by fox +# Optimize system parameters + +kernel.panic = 20 +kernel.panic_on_oops = 1 + +net.core.default_qdisc = fq +net.ipv4.tcp_congestion_control = bbr + +# Other adjustable system parameters + +net.ipv4.conf.all.log_martians = 1 + +net.ipv4.igmp_max_memberships = 100 + +net.ipv4.tcp_challenge_ack_limit = 1000 +net.ipv4.tcp_fin_timeout = 30 +net.ipv4.tcp_keepalive_time = 120 +net.ipv4.tcp_max_orphans = 4096 +net.ipv4.tcp_max_tw_buckets = 4096 +net.ipv4.tcp_syncookies = 1 + +net.ipv6.conf.all.use_tempaddr = 0 +net.ipv6.conf.default.use_tempaddr = 0 + diff --git a/src/debian/debian_dnsmasq.conf b/src/debian/debian_dnsmasq.conf new file mode 100644 index 0000000..c7140cb --- /dev/null +++ b/src/debian/debian_dnsmasq.conf @@ -0,0 +1,46 @@ +# This configuration file is customized by fox, +# Optimize dnsmasq parameters for local DNS server. + +# Main Config + +conf-file=/etc/dnsmasq.conf + +log-facility=/var/log/dnsmasq.log +log-async=20 + +cache-size=1024 +edns-packet-max=1232 +rebind-domain-ok=/fox.home.arpa/ + +bind-dynamic +bogus-priv +domain-needed +expand-hosts +localise-queries +local-service +no-negcache +no-resolv +rebind-localhost-ok +stop-dns-rebind + +# DNS Filter + +server=/alt/ +server=/home.arpa/ +server=/ipv4only.arpa/ +server=/resolver.arpa/ +server=/example/ +server=/bind/ +server=/invalid/ +server=/local/ +server=/localhost/ +server=/onion/ +server=/test/ + +# DNS Server + +server=/fox.home.arpa/172.16.1.1 +server=/fox.home.arpa/fdac::1 +server=127.0.0.1#8053 +server=::1#8053 + diff --git a/src/debian/debian_dnsmasq_smartdns.conf b/src/debian/debian_dnsmasq_smartdns.conf new file mode 100644 index 0000000..a6298de --- /dev/null +++ b/src/debian/debian_dnsmasq_smartdns.conf @@ -0,0 +1,52 @@ +# This configuration file is customized by fox, +# Optimize SmartDNS parameters for local DNS server. +# +# For use common DNS server as upstream DNS server, +# please modify 'server' parameter according to +# your network environment. +# +# eg: +# server 119.29.29.29 +# server 223.5.5.5 +# server 114.114.114.114 +# server 2402:4e00:: +# server 2400:3200::1 + +conf-file /etc/smartdns/anti-ad-smartdns.conf +cache-file /tmp/smartdns.cache + +bind [::]:8053@lo +bind-tcp [::]:8053@lo + +serve-expired yes +serve-expired-ttl 57600 +serve-expired-reply-ttl 3 +prefetch-domain yes +serve-expired-prefetch-time 28800 + +speed-check-mode ping,tcp:80,tcp:443 + +force-qtype-SOA 65 + +log-level notice + +server-tcp 119.29.29.29 -group dnspod -exclude-default-group +server-tcp 2402:4e00:: -group dnspod -exclude-default-group +nameserver /doh.pub/dnspod +nameserver /dot.pub/dnspod + +server-tcp 223.5.5.5 -group alidns -exclude-default-group +server-tcp 2400:3200::1 -group alidns -exclude-default-group +nameserver /dns.alidns.com/alidns + +server 172.16.1.1 -group intranet -exclude-default-group +server fdac::1 -group intranet -exclude-default-group +nameserver /fox.home.arpa/intranet +domain-rules /fox.home.arpa/ -speed-check-mode none -no-cache + +server-tls dot.pub +server-tls dns.alidns.com + +server-https https://doh.pub/dns-query +server-https https://dns.alidns.com/dns-query + diff --git a/src/debian_smartdns.conf b/src/debian/debian_smartdns.conf similarity index 100% rename from src/debian_smartdns.conf rename to src/debian/debian_smartdns.conf diff --git a/src/debian_sources.conf b/src/debian/debian_sources.conf similarity index 100% rename from src/debian_sources.conf rename to src/debian/debian_sources.conf diff --git a/src/pve_20auto_upgrades.conf b/src/pve/pve_20auto_upgrades.conf similarity index 96% rename from src/pve_20auto_upgrades.conf rename to src/pve/pve_20auto_upgrades.conf index 3351130..1a6aa8f 100644 --- a/src/pve_20auto_upgrades.conf +++ b/src/pve/pve_20auto_upgrades.conf @@ -1,5 +1,5 @@ -APT::Periodic::Update-Package-Lists "1"; -APT::Periodic::Unattended-Upgrade "5"; -APT::Periodic::AutocleanInterval "1"; -APT::Periodic::CleanInterval "1"; - +APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Unattended-Upgrade "5"; +APT::Periodic::AutocleanInterval "1"; +APT::Periodic::CleanInterval "1"; + diff --git a/src/pve_50unattended_upgrades.conf b/src/pve/pve_50unattended_upgrades.conf similarity index 97% rename from src/pve_50unattended_upgrades.conf rename to src/pve/pve_50unattended_upgrades.conf index a719c94..79c95ed 100644 --- a/src/pve_50unattended_upgrades.conf +++ b/src/pve/pve_50unattended_upgrades.conf @@ -1,179 +1,179 @@ -// Unattended-Upgrade::Origins-Pattern controls which packages are -// upgraded. -// -// Lines below have the format "keyword=value,...". A -// package will be upgraded only if the values in its metadata match -// all the supplied keywords in a line. (In other words, omitted -// keywords are wild cards.) The keywords originate from the Release -// file, but several aliases are accepted. The accepted keywords are: -// a,archive,suite (eg, "stable") -// c,component (eg, "main", "contrib", "non-free") -// l,label (eg, "Debian", "Debian-Security") -// o,origin (eg, "Debian", "Unofficial Multimedia Packages") -// n,codename (eg, "jessie", "jessie-updates") -// site (eg, "http.debian.net") -// The available values on the system are printed by the command -// "apt-cache policy", and can be debugged by running -// "unattended-upgrades -d" and looking at the log file. -// -// Within lines unattended-upgrades allows 2 macros whose values are -// derived from /etc/debian_version: -// ${distro_id} Installed origin. -// ${distro_codename} Installed codename (eg, "buster") -Unattended-Upgrade::Origins-Pattern { - // Codename based matching: - // This will follow the migration of a release through different - // archives (e.g. from testing to stable and later oldstable). - // Software will be the latest available for the named release, - // but the Debian release itself will not be automatically upgraded. - "origin=Debian,codename=${distro_codename}-updates"; -// "origin=Debian,codename=${distro_codename}-proposed-updates"; - "origin=Debian,codename=${distro_codename},label=Debian"; - "origin=Debian,codename=${distro_codename},label=Debian-Security"; - "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; - "origin=Proxmox,codename=${distro_codename},label=Proxmox Debian Repository"; -// "origin=Proxmox,codename=${distro_codename},label=Proxmox Ceph Debian Repository"; - - // Archive or Suite based matching: - // Note that this will silently match a different release after - // migration to the specified archive (e.g. testing becomes the - // new stable). -// "o=Debian,a=stable"; -// "o=Debian,a=stable-updates"; -// "o=Debian,a=proposed-updates"; -// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports"; -}; - -// Python regular expressions, matching packages to exclude from upgrading -Unattended-Upgrade::Package-Blacklist { - // The following matches all packages starting with linux- -// "linux-"; - - // Use $ to explicitely define the end of a package name. Without - // the $, "libc6" would match all of them. -// "libc6$"; -// "libc6-dev$"; -// "libc6-i686$"; - - // Special characters need escaping -// "libstdc\+\+6$"; - - // The following matches packages like xen-system-amd64, xen-utils-4.1, - // xenstore-utils and libxenstore3.0 -// "(lib)?xen(store)?"; - - // For more information about Python regular expressions, see - // https://docs.python.org/3/howto/regex.html -}; - -// This option allows you to control if on a unclean dpkg exit -// unattended-upgrades will automatically run -// dpkg --force-confold --configure -a -// The default is true, to ensure updates keep getting installed -//Unattended-Upgrade::AutoFixInterruptedDpkg "true"; - -// Split the upgrade into the smallest possible chunks so that -// they can be interrupted with SIGTERM. This makes the upgrade -// a bit slower but it has the benefit that shutdown while a upgrade -// is running is possible (with a small delay) -//Unattended-Upgrade::MinimalSteps "true"; - -// Install all updates when the machine is shutting down -// instead of doing it in the background while the machine is running. -// This will (obviously) make shutdown slower. -// Unattended-upgrades increases logind's InhibitDelayMaxSec to 30s. -// This allows more time for unattended-upgrades to shut down gracefully -// or even install a few packages in InstallOnShutdown mode, but is still a -// big step back from the 30 minutes allowed for InstallOnShutdown previously. -// Users enabling InstallOnShutdown mode are advised to increase -// InhibitDelayMaxSec even further, possibly to 30 minutes. -//Unattended-Upgrade::InstallOnShutdown "false"; - -// Send email to this address for problems or packages upgrades -// If empty or unset then no email is sent, make sure that you -// have a working mail setup on your system. A package that provides -// 'mailx' must be installed. E.g. "user@example.com" -//Unattended-Upgrade::Mail ""; - -// Set this value to one of: -// "always", "only-on-error" or "on-change" -// If this is not set, then any legacy MailOnlyOnError (boolean) value -// is used to chose between "only-on-error" and "on-change" -//Unattended-Upgrade::MailReport "on-change"; - -// Remove unused automatically installed kernel-related packages -// (kernel images, kernel headers and kernel version locked tools). -//Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; - -// 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"; - -// Automatically reboot *WITHOUT CONFIRMATION* if -// the file /var/run/reboot-required is found after the upgrade -//Unattended-Upgrade::Automatic-Reboot "false"; - -// Automatically reboot even if there are users currently logged in -// when Unattended-Upgrade::Automatic-Reboot is set to true -//Unattended-Upgrade::Automatic-Reboot-WithUsers "true"; - -// If automatic reboot is enabled and needed, reboot at the specific -// time instead of immediately -// Default: "now" -//Unattended-Upgrade::Automatic-Reboot-Time "02:00"; - -// Use apt bandwidth limit feature, this example limits the download -// speed to 70kb/sec -//Acquire::http::Dl-Limit "70"; - -// Enable logging to syslog. Default is False -// Unattended-Upgrade::SyslogEnable "false"; - -// Specify syslog facility. Default is daemon -// Unattended-Upgrade::SyslogFacility "daemon"; - -// Download and install upgrades only on AC power -// (i.e. skip or gracefully stop updates on battery) -// Unattended-Upgrade::OnlyOnACPower "true"; - -// Download and install upgrades only on non-metered connection -// (i.e. skip or gracefully stop updates on a metered connection) -// Unattended-Upgrade::Skip-Updates-On-Metered-Connections "true"; - -// Verbose logging -// Unattended-Upgrade::Verbose "false"; - -// Print debugging information both in unattended-upgrades and -// in unattended-upgrade-shutdown -// Unattended-Upgrade::Debug "false"; - -// Allow package downgrade if Pin-Priority exceeds 1000 -// Unattended-Upgrade::Allow-downgrade "false"; - -// When APT fails to mark a package to be upgraded or installed try adjusting -// candidates of related packages to help APT's resolver in finding a solution -// where the package can be upgraded or installed. -// This is a workaround until APT's resolver is fixed to always find a -// solution if it exists. (See Debian bug #711128.) -// The fallback is enabled by default, except on Debian's sid release because -// uninstallable packages are frequent there. -// Disabling the fallback speeds up unattended-upgrades when there are -// uninstallable packages at the expense of rarely keeping back packages which -// could be upgraded or installed. -// Unattended-Upgrade::Allow-APT-Mark-Fallback "true"; - -Unattended-Upgrade::AutoFixInterruptedDpkg "true"; - -Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; - -Unattended-Upgrade::Remove-New-Unused-Dependencies "true"; - -Unattended-Upgrade::Remove-Unused-Dependencies "true"; - -Unattended-Upgrade::Automatic-Reboot "true"; - -Unattended-Upgrade::Automatic-Reboot-Time "02:30"; - +// Unattended-Upgrade::Origins-Pattern controls which packages are +// upgraded. +// +// Lines below have the format "keyword=value,...". A +// package will be upgraded only if the values in its metadata match +// all the supplied keywords in a line. (In other words, omitted +// keywords are wild cards.) The keywords originate from the Release +// file, but several aliases are accepted. The accepted keywords are: +// a,archive,suite (eg, "stable") +// c,component (eg, "main", "contrib", "non-free") +// l,label (eg, "Debian", "Debian-Security") +// o,origin (eg, "Debian", "Unofficial Multimedia Packages") +// n,codename (eg, "jessie", "jessie-updates") +// site (eg, "http.debian.net") +// The available values on the system are printed by the command +// "apt-cache policy", and can be debugged by running +// "unattended-upgrades -d" and looking at the log file. +// +// Within lines unattended-upgrades allows 2 macros whose values are +// derived from /etc/debian_version: +// ${distro_id} Installed origin. +// ${distro_codename} Installed codename (eg, "buster") +Unattended-Upgrade::Origins-Pattern { + // Codename based matching: + // This will follow the migration of a release through different + // archives (e.g. from testing to stable and later oldstable). + // Software will be the latest available for the named release, + // but the Debian release itself will not be automatically upgraded. + "origin=Debian,codename=${distro_codename}-updates"; +// "origin=Debian,codename=${distro_codename}-proposed-updates"; + "origin=Debian,codename=${distro_codename},label=Debian"; + "origin=Debian,codename=${distro_codename},label=Debian-Security"; + "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; + "origin=Proxmox,codename=${distro_codename},label=Proxmox Debian Repository"; +// "origin=Proxmox,codename=${distro_codename},label=Proxmox Ceph Debian Repository"; + + // Archive or Suite based matching: + // Note that this will silently match a different release after + // migration to the specified archive (e.g. testing becomes the + // new stable). +// "o=Debian,a=stable"; +// "o=Debian,a=stable-updates"; +// "o=Debian,a=proposed-updates"; +// "o=Debian Backports,a=${distro_codename}-backports,l=Debian Backports"; +}; + +// Python regular expressions, matching packages to exclude from upgrading +Unattended-Upgrade::Package-Blacklist { + // The following matches all packages starting with linux- +// "linux-"; + + // Use $ to explicitely define the end of a package name. Without + // the $, "libc6" would match all of them. +// "libc6$"; +// "libc6-dev$"; +// "libc6-i686$"; + + // Special characters need escaping +// "libstdc\+\+6$"; + + // The following matches packages like xen-system-amd64, xen-utils-4.1, + // xenstore-utils and libxenstore3.0 +// "(lib)?xen(store)?"; + + // For more information about Python regular expressions, see + // https://docs.python.org/3/howto/regex.html +}; + +// This option allows you to control if on a unclean dpkg exit +// unattended-upgrades will automatically run +// dpkg --force-confold --configure -a +// The default is true, to ensure updates keep getting installed +//Unattended-Upgrade::AutoFixInterruptedDpkg "true"; + +// Split the upgrade into the smallest possible chunks so that +// they can be interrupted with SIGTERM. This makes the upgrade +// a bit slower but it has the benefit that shutdown while a upgrade +// is running is possible (with a small delay) +//Unattended-Upgrade::MinimalSteps "true"; + +// Install all updates when the machine is shutting down +// instead of doing it in the background while the machine is running. +// This will (obviously) make shutdown slower. +// Unattended-upgrades increases logind's InhibitDelayMaxSec to 30s. +// This allows more time for unattended-upgrades to shut down gracefully +// or even install a few packages in InstallOnShutdown mode, but is still a +// big step back from the 30 minutes allowed for InstallOnShutdown previously. +// Users enabling InstallOnShutdown mode are advised to increase +// InhibitDelayMaxSec even further, possibly to 30 minutes. +//Unattended-Upgrade::InstallOnShutdown "false"; + +// Send email to this address for problems or packages upgrades +// If empty or unset then no email is sent, make sure that you +// have a working mail setup on your system. A package that provides +// 'mailx' must be installed. E.g. "user@example.com" +//Unattended-Upgrade::Mail ""; + +// Set this value to one of: +// "always", "only-on-error" or "on-change" +// If this is not set, then any legacy MailOnlyOnError (boolean) value +// is used to chose between "only-on-error" and "on-change" +//Unattended-Upgrade::MailReport "on-change"; + +// Remove unused automatically installed kernel-related packages +// (kernel images, kernel headers and kernel version locked tools). +//Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; + +// 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"; + +// Automatically reboot *WITHOUT CONFIRMATION* if +// the file /var/run/reboot-required is found after the upgrade +//Unattended-Upgrade::Automatic-Reboot "false"; + +// Automatically reboot even if there are users currently logged in +// when Unattended-Upgrade::Automatic-Reboot is set to true +//Unattended-Upgrade::Automatic-Reboot-WithUsers "true"; + +// If automatic reboot is enabled and needed, reboot at the specific +// time instead of immediately +// Default: "now" +//Unattended-Upgrade::Automatic-Reboot-Time "02:00"; + +// Use apt bandwidth limit feature, this example limits the download +// speed to 70kb/sec +//Acquire::http::Dl-Limit "70"; + +// Enable logging to syslog. Default is False +// Unattended-Upgrade::SyslogEnable "false"; + +// Specify syslog facility. Default is daemon +// Unattended-Upgrade::SyslogFacility "daemon"; + +// Download and install upgrades only on AC power +// (i.e. skip or gracefully stop updates on battery) +// Unattended-Upgrade::OnlyOnACPower "true"; + +// Download and install upgrades only on non-metered connection +// (i.e. skip or gracefully stop updates on a metered connection) +// Unattended-Upgrade::Skip-Updates-On-Metered-Connections "true"; + +// Verbose logging +// Unattended-Upgrade::Verbose "false"; + +// Print debugging information both in unattended-upgrades and +// in unattended-upgrade-shutdown +// Unattended-Upgrade::Debug "false"; + +// Allow package downgrade if Pin-Priority exceeds 1000 +// Unattended-Upgrade::Allow-downgrade "false"; + +// When APT fails to mark a package to be upgraded or installed try adjusting +// candidates of related packages to help APT's resolver in finding a solution +// where the package can be upgraded or installed. +// This is a workaround until APT's resolver is fixed to always find a +// solution if it exists. (See Debian bug #711128.) +// The fallback is enabled by default, except on Debian's sid release because +// uninstallable packages are frequent there. +// Disabling the fallback speeds up unattended-upgrades when there are +// uninstallable packages at the expense of rarely keeping back packages which +// could be upgraded or installed. +// Unattended-Upgrade::Allow-APT-Mark-Fallback "true"; + +Unattended-Upgrade::AutoFixInterruptedDpkg "true"; + +Unattended-Upgrade::Remove-Unused-Kernel-Packages "true"; + +Unattended-Upgrade::Remove-New-Unused-Dependencies "true"; + +Unattended-Upgrade::Remove-Unused-Dependencies "true"; + +Unattended-Upgrade::Automatic-Reboot "true"; + +Unattended-Upgrade::Automatic-Reboot-Time "02:30"; + diff --git a/src/pve_apt_daily_upgrade.conf b/src/pve/pve_apt_daily_upgrade.conf similarity index 95% rename from src/pve_apt_daily_upgrade.conf rename to src/pve/pve_apt_daily_upgrade.conf index 0f3b3d1..54b524f 100644 --- a/src/pve_apt_daily_upgrade.conf +++ b/src/pve/pve_apt_daily_upgrade.conf @@ -1,23 +1,23 @@ -### Editing /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf -### Anything between here and the comment below will become the new contents of the file - -[Timer] -OnCalendar= -OnCalendar=01:30 -RandomizedDelaySec=0 - -### Lines below this comment will be discarded - -### /lib/systemd/system/apt-daily-upgrade.timer -# [Unit] -# Description=Daily apt upgrade and clean activities -# After=apt-daily.timer -# -# [Timer] -# OnCalendar=*-*-* 6:00 -# RandomizedDelaySec=60m -# Persistent=true -# -# [Install] -# WantedBy=timers.target - +### Editing /etc/systemd/system/apt-daily-upgrade.timer.d/override.conf +### Anything between here and the comment below will become the new contents of the file + +[Timer] +OnCalendar= +OnCalendar=01:30 +RandomizedDelaySec=0 + +### Lines below this comment will be discarded + +### /lib/systemd/system/apt-daily-upgrade.timer +# [Unit] +# Description=Daily apt upgrade and clean activities +# After=apt-daily.timer +# +# [Timer] +# OnCalendar=*-*-* 6:00 +# RandomizedDelaySec=60m +# Persistent=true +# +# [Install] +# WantedBy=timers.target + diff --git a/src/pve_cpufrequtils.conf b/src/pve/pve_cpufrequtils.conf similarity index 96% rename from src/pve_cpufrequtils.conf rename to src/pve/pve_cpufrequtils.conf index 8337700..7549d16 100644 --- a/src/pve_cpufrequtils.conf +++ b/src/pve/pve_cpufrequtils.conf @@ -1,101 +1,101 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: cpufrequtils -# Required-Start: $remote_fs loadcpufreq -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: -# Short-Description: set CPUFreq kernel parameters -# Description: utilities to deal with CPUFreq Linux -# kernel support -### END INIT INFO -# - -DESC="CPUFreq Utilities" - -PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin -CPUFREQ_SET=/usr/bin/cpufreq-set -CPUFREQ_INFO=/usr/bin/cpufreq-info -CPUFREQ_OPTIONS="" - -# use lsb-base -. /lib/lsb/init-functions - -# Which governor to use. Must be one of the governors listed in: -# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors -# -# and which limits to set. Both MIN_SPEED and MAX_SPEED must be values -# listed in: -# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies -# a value of 0 for any of the two variables will disabling the use of -# that limit variable. -# -# WARNING: the correct kernel module must already be loaded or compiled in. -# -# Set ENABLE to "true" to let the script run at boot time. -# -# eg: ENABLE="true" -# GOVERNOR="ondemand" -# MAX_SPEED=1000 -# MIN_SPEED=500 - -ENABLE="true" -GOVERNOR="powersave" -MAX_SPEED="0" -MIN_SPEED="0" - -check_governor_avail() { - info="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors" - if [ -f $info ] && grep -q "\<$GOVERNOR\>" $info ; then - return 0; - fi - return 1; -} - -[ -x $CPUFREQ_SET ] || exit 0 - -if [ -f /etc/default/cpufrequtils ] ; then - . /etc/default/cpufrequtils -fi - -# if not enabled then exit gracefully -[ "$ENABLE" = "true" ] || exit 0 - -if [ -n "$MAX_SPEED" ] && [ $MAX_SPEED != "0" ] ; then - CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --max $MAX_SPEED" -fi - -if [ -n "$MIN_SPEED" ] && [ $MIN_SPEED != "0" ] ; then - CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --min $MIN_SPEED" -fi - -if [ -n "$GOVERNOR" ] ; then - CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --governor $GOVERNOR" -fi - -CPUS=$(cat /proc/stat|sed -ne 's/^cpu\([[:digit:]]\+\).*/\1/p') -RETVAL=0 -case "$1" in - start|force-reload|restart|reload) - log_action_begin_msg "$DESC: Setting $GOVERNOR CPUFreq governor" - if check_governor_avail ; then - for cpu in $CPUS ; do - log_action_cont_msg "CPU${cpu}" - $CPUFREQ_SET --cpu $cpu $CPUFREQ_OPTIONS 2>&1 > /dev/null || \ - RETVAL=$? - done - log_action_end_msg $RETVAL "" - else - log_action_cont_msg "disabled, governor not available" - log_action_end_msg $RETVAL - fi - ;; - stop) - ;; - *) - echo "Usage: $0 {start|stop|restart|reload|force-reload}" - exit 1 -esac - -exit 0 - +#!/bin/sh +### BEGIN INIT INFO +# Provides: cpufrequtils +# Required-Start: $remote_fs loadcpufreq +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: +# Short-Description: set CPUFreq kernel parameters +# Description: utilities to deal with CPUFreq Linux +# kernel support +### END INIT INFO +# + +DESC="CPUFreq Utilities" + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +CPUFREQ_SET=/usr/bin/cpufreq-set +CPUFREQ_INFO=/usr/bin/cpufreq-info +CPUFREQ_OPTIONS="" + +# use lsb-base +. /lib/lsb/init-functions + +# Which governor to use. Must be one of the governors listed in: +# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors +# +# and which limits to set. Both MIN_SPEED and MAX_SPEED must be values +# listed in: +# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies +# a value of 0 for any of the two variables will disabling the use of +# that limit variable. +# +# WARNING: the correct kernel module must already be loaded or compiled in. +# +# Set ENABLE to "true" to let the script run at boot time. +# +# eg: ENABLE="true" +# GOVERNOR="ondemand" +# MAX_SPEED=1000 +# MIN_SPEED=500 + +ENABLE="true" +GOVERNOR="powersave" +MAX_SPEED="0" +MIN_SPEED="0" + +check_governor_avail() { + info="/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors" + if [ -f $info ] && grep -q "\<$GOVERNOR\>" $info ; then + return 0; + fi + return 1; +} + +[ -x $CPUFREQ_SET ] || exit 0 + +if [ -f /etc/default/cpufrequtils ] ; then + . /etc/default/cpufrequtils +fi + +# if not enabled then exit gracefully +[ "$ENABLE" = "true" ] || exit 0 + +if [ -n "$MAX_SPEED" ] && [ $MAX_SPEED != "0" ] ; then + CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --max $MAX_SPEED" +fi + +if [ -n "$MIN_SPEED" ] && [ $MIN_SPEED != "0" ] ; then + CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --min $MIN_SPEED" +fi + +if [ -n "$GOVERNOR" ] ; then + CPUFREQ_OPTIONS="$CPUFREQ_OPTIONS --governor $GOVERNOR" +fi + +CPUS=$(cat /proc/stat|sed -ne 's/^cpu\([[:digit:]]\+\).*/\1/p') +RETVAL=0 +case "$1" in + start|force-reload|restart|reload) + log_action_begin_msg "$DESC: Setting $GOVERNOR CPUFreq governor" + if check_governor_avail ; then + for cpu in $CPUS ; do + log_action_cont_msg "CPU${cpu}" + $CPUFREQ_SET --cpu $cpu $CPUFREQ_OPTIONS 2>&1 > /dev/null || \ + RETVAL=$? + done + log_action_end_msg $RETVAL "" + else + log_action_cont_msg "disabled, governor not available" + log_action_end_msg $RETVAL + fi + ;; + stop) + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|force-reload}" + exit 1 +esac + +exit 0 + diff --git a/src/pve_cpupower.conf b/src/pve/pve_cpupower.conf similarity index 100% rename from src/pve_cpupower.conf rename to src/pve/pve_cpupower.conf diff --git a/src/pve_cpupower_service.conf b/src/pve/pve_cpupower_service.conf similarity index 100% rename from src/pve_cpupower_service.conf rename to src/pve/pve_cpupower_service.conf