From b4dceac194f50f5feaeee35bf975de4e281b5863 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sun, 11 Jul 2021 15:38:35 +0800 Subject: [PATCH] update readme --- README.md | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 20106ee..66119d2 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # Pacroller -The "Unattended Upgrades" for Arch Linux. +The "Unattended Upgrades" for Arch Linux. ## Concept -Parsing the output of pacman and pacman.log, searching for known patterns and notifying the user whether there is a potential error. -Currently the design is regex-based, any output that is unable to match a set of regex is reported back to the user. +Parsing the output of pacman and pacman.log, searching for known patterns and notifying the user whether there is a potential error. +Currently the design is regex-based, any output that is unable to match a set of regex is reported back to the user. ## Installation `yay -S pacroller` ## Usage -pacroller has the following subcommands +pacroller has the following subcommands ``` run [-d --debug] start an upgrade @@ -20,28 +20,33 @@ status [-v --verbose] [-m --max ] print details of a previously successful upgrade reset reset the current failure status +test-smtp + send an test email to the configured address ``` -There is also a systemd timer for scheduled automatic upgrades. +There is also a systemd timer for scheduled automatic upgrades. ## Configuration -Pacroller reads `/etc/pacroller/config.json` on startup. +Pacroller reads `/etc/pacroller/config.json` on startup. ### custom sync commands -Pacroller can be configured to use custom sync commands, which allows the usage of a different set of mirrors when syncing the database. Enable the "custom_sync" option and write your custom `/etc/pacroller/sync.sh`. +Pacroller can be configured to use custom sync commands, which allows the usage of a different set of mirrors when syncing the database. Enable the "custom_sync" option and write your custom `/etc/pacroller/sync.sh`. ### needrestart -If the "needrestart" option is enabled, needrestart should be called after a successful upgrade. +If the "needrestart" option is enabled, needrestart should be called after a successful upgrade. ### hold packages -Put your hold packages in a json keyval {package name: regex}, where the regex should have at least one matching group. -If pacroller observes any changes of the matching group or the hold package is to be removed, it refuses to upgrade further. +Put your hold packages in a json keyval {package name: regex}, where the regex should have at least one matching group. +If pacroller observes any changes of the matching group or the hold package is to be removed, it refuses to upgrade further. ### ignored pacnew -A list of pacnew files that are silently ignored during parsing, any other pacnews will trigger a warning and prevent further upgrades. +A list of pacnew files that are silently ignored during parsing, any other pacnews will trigger a warning and prevent further upgrades. ### custom pacman hooks and packages -Custom pacman hooks and packages output matching is configurable via `/etc/pacroller/known_output_override.py`. +Custom pacman hooks and packages output matching is configurable via `/etc/pacroller/known_output_override.py`. ### check systemd status -The "systemd-check" option allows pacroller to check fo degraded systemd services before an upgrade. +The "systemd-check" option allows pacroller to check fo degraded systemd services before an upgrade. ### clear package cache -Pacroller wipes /var/cache/pacman/pkg after a successful upgrade if the option "clear_pkg_cache" is set. +Pacroller wipes /var/cache/pacman/pkg after a successful upgrade if the option "clear_pkg_cache" is set. ### save pacman output -Every time an upgrade is performed, the pacman output is stored into /var/log/pacroller. This can be configured via the "save_stdout" keyword. +Every time an upgrade is performed, the pacman output is stored into /var/log/pacroller. This can be configured via the "save_stdout" keyword. + +## Smtp +Configure `/etc/pacroller/smtp.json` to receive an email notification when an upgrade fails. Note that pacroller will not send any email if stdin is a tty (can be overridden by the `--interactive` switch). ## Limitations - Your favourite package may not be supported, however it's easy to add another set of rules.