cron-apt
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
cron-apt [2015/11/11 09:28] – [Configuration] pascal | cron-apt [2023/07/04 10:55] (Version actuelle) – modification externe 127.0.0.1 | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
===== Présentation ===== | ===== Présentation ===== | ||
- | cron-atp contrôle de manière automatique que le système est à jour. Si un paquet est à mettre à jour, envoie une alerte par mail. | + | cron-atp contrôle de manière automatique que le système est à jour. Si un paquet est à mettre à jour, cron-apt |
===== Installation ===== | ===== Installation ===== | ||
Ligne 12: | Ligne 12: | ||
===== Configuration ===== | ===== Configuration ===== | ||
- | <code bash> | ||
- | vi / | ||
- | </ | ||
- | ==== Modification ==== | + | ==== Fichier /etc/cron-apt/ |
- | + | ||
- | < | + | |
- | MAILTO=" | + | |
- | MAILON=" | + | |
- | </file> | + | |
- | + | ||
- | cron-apt | + | |
- | ==== Fichier résultat | + | |
< | < | ||
# Configuration for cron-apt. | # Configuration for cron-apt. | ||
- | # The cron config is located in / | ||
- | # This shows the defaults. | ||
- | # | ||
- | |||
- | # The command used to execute all actions. | ||
- | # Change this to / | ||
- | # resolve changed Recommends (and Suggests as well, if aptitude is so | ||
- | # configured). You can also set other utilities (especially useful in the | ||
- | # config.d directory) so set some completely different tool. | ||
- | # OBSERVE that this tool is indended for apt-get and tools like aptitude do not | ||
- | # have full support for noninteractive upgrades. You may have to tune options | ||
- | # to not create infinit logfiles for example. | ||
- | # APTCOMMAND=/ | ||
- | # APTCOMMAND=/ | ||
- | # APTCOMMAND=/ | ||
- | |||
- | # A path is needed for this to work. This is the default PATH. | ||
- | # export PATH=/ | ||
- | |||
- | # The random sleep time in seconds. This is used to prevent clients from | ||
- | # accessing the APT sources all at the same time and overwhelming them. | ||
- | # Default is 3600 seconds which means one hour. | ||
- | # RUNSLEEP=3600 | ||
- | |||
- | # The minimum amount of disc space (in kB) that need to exist on the | ||
- | # device where temporary files are created (mktemp) to allow cron-apt | ||
- | # to run. If set to 0 it will always continue even if empty. | ||
- | # MINTMPDIRSIZE=10 | ||
- | |||
- | # The directory where the actions is stored. | ||
- | # ACTIONDIR="/ | ||
- | |||
- | # The directory where configuration per action is stored. The message file | ||
- | # must have the same name as the action file. | ||
- | # ACTIONCONFDIR="/ | ||
- | |||
- | # The directory where messages that will be prepended to the email that is | ||
- | # sent (per action) is stored. The message file must have the same name as | ||
- | # the action file. | ||
- | # MAILMSGDIR="/ | ||
- | |||
- | # The directory where messages that will be prepended to text that is | ||
- | # sent (per action) to syslog. The message file must have the same name as | ||
- | # the action file. | ||
- | # SYSLOGMSGDIR="/ | ||
- | |||
- | # The directory where messages that will be prepended to the error message | ||
- | # (per action) is stored. The message file must have the same name as | ||
- | # the action file. | ||
- | # ERRORMSGDIR="/ | ||
- | |||
- | # The directory where messages that will be prepended to the log (debug) | ||
- | # message (per action) is stored. The message file must have the same name as | ||
- | # the action file. | ||
- | # LOGMSGDIR="/ | ||
- | |||
- | # The directory where messages that will be prepended to the mail message | ||
- | # (per MAILON type) is stored. The message file must have the same name as | ||
- | # the $MAILON directive. | ||
- | # MAILONMSGSDIR="/ | ||
- | |||
- | # The directory where messages that will be prepended to the syslog message | ||
- | # (per SYSLOGON type) is stored. The message file must have the same name as | ||
- | # the $SYSLOGON directive. | ||
- | # SYSLOGONMSGSDIR="/ | ||
- | |||
- | # Value: "" | ||
- | # " | ||
- | # NOLOCKWARN="" | ||
- | |||
- | # The file that contains error messages. | ||
- | # ERROR="/ | ||
- | |||
- | # The file that contains current run information | ||
- | # when still running the script. | ||
- | # TEMP="/ | ||
- | |||
- | # The logfile (for debugging). Use syslog for normal logging. | ||
- | # LOG="/ | ||
- | |||
- | # The mail file. | ||
- | # MAIL="/ | ||
# The email address to send mail to. | # The email address to send mail to. | ||
Ligne 117: | Ligne 23: | ||
# When to send email about the cron-apt results. | # When to send email about the cron-apt results. | ||
# Value: error (send mail on error runs) | # Value: error (send mail on error runs) | ||
- | # upgrade (when packages are upgraded) | + | # upgrade (when packages are upgraded) |
- | # changes (mail when change in output from an action) | + | # changes (mail when change in output from an action) |
- | # output | + | # output |
# always | # always | ||
# (else never send mail) | # (else never send mail) | ||
MAILON=" | MAILON=" | ||
- | |||
- | # Value: error | ||
- | # upgrade (when packages is upgraded) | ||
- | # changes (syslog when change in output from an action) | ||
- | # output | ||
- | # always | ||
- | # (else never syslog) | ||
- | # SYSLOGON=" | ||
- | |||
- | # Value: error (exit on error only) | ||
- | # (else never exit) | ||
- | # EXITON=" | ||
- | |||
- | # Value: verbose (log everything) | ||
- | # always | ||
- | # upgrade (when packages is upgraded) | ||
- | # changes (log when change in output from an action) | ||
- | # output | ||
- | # error (log error runs only) | ||
- | # (else log nothing) | ||
- | # DEBUG=" | ||
- | |||
- | # What to do with the diff when *ON=changes. | ||
- | # Value: prepend (prepend to the output) | ||
- | # append | ||
- | # only (only show the diff, not the output itself) | ||
- | # (else do nothing) | ||
- | # DIFFONCHANGES=prepend | ||
- | |||
- | # General apt options that will be passed to all APTCOMMAND calls. | ||
- | # Use "-o quiet" instead of " | ||
- | # OPTIONS=" | ||
- | # You can for example add an additional sources.list file here. | ||
- | # OPTIONS=" | ||
- | # You can also set an alternative sources.list file here. | ||
- | # OPTIONS=" | ||
- | # If you want to allow unauthenticated and untrusted packages add the | ||
- | # following to your options directive. | ||
- | # OPTIONS=" | ||
- | # To limit the bandwidth used use the following line. This example limit the | ||
- | # bandwidth usage to 25 kB/s. | ||
- | # OPTIONS=" | ||
- | |||
- | # additional APT configuration file that is loaded first. This can be set in | ||
- | # order to use a completely different APT configuration for cron-apt. See the | ||
- | # / | ||
- | # export APT_CONFIG=/ | ||
- | |||
- | # Do not run the command, if there is an error in the previous run (default). | ||
- | # Value: error (do not run if there is an error on last run) | ||
- | # (else always run, remove previous error file and run) | ||
- | # DONTRUN="" | ||
- | |||
- | # If this file exist cron-apt will silently exit. | ||
- | # REFRAINFILE=/ | ||
# If this is non-empty, it will be used as the host name in subjects of | # If this is non-empty, it will be used as the host name in subjects of | ||
Ligne 183: | Ligne 34: | ||
# will be used. | # will be used. | ||
HOSTNAME=" | HOSTNAME=" | ||
- | |||
- | # Ignore lines matching this regexp to determine whether changes occurred | ||
- | # for MAILON=" | ||
- | # Suggested value for aptitude: | ||
- | # DIFFIGNORE=" | ||
- | |||
- | # Suggested value for apt-get: | ||
- | # DIFFIGNORE=" | ||
- | # Default: | ||
- | # DIFFIGNORE="" | ||
- | |||
- | # Support for mail headers. You can add up to 9 headers to the mail sent. | ||
- | # This below example can be used for OTRS. | ||
- | # The default is no headers added. | ||
- | # XHEADER1=" | ||
- | # XHEADER2=" | ||
- | # ... | ||
- | |||
- | # Umask for the files created by the APT command used. In all other cases | ||
- | # umask 077 will be used. | ||
- | # UMASK_APT=" | ||
</ | </ | ||
+ | cron-apt enverra un mail à **root** - voir le paramétrage d' | ||
===== Planification avec cron ===== | ===== Planification avec cron ===== | ||
+ | ==== Fichier / | ||
< | < | ||
# | # |
cron-apt.1447234129.txt.gz · Dernière modification : 2023/07/04 10:55 (modification externe)