translator
10,713
edits
(Created page with "=== Краткое изложение приведенного выше примера на данный момент ===") |
(Created page with "По сути, он выполняет эту команду:") |
||
Line 341: | Line 341: | ||
Первый шаг помещает файл в '''/etc/cron.daily''', что является простым способом добавить скрипт в ежедневное задание cron. Это означает, что скрипт будет выполняться каждый день. | Первый шаг помещает файл в '''/etc/cron.daily''', что является простым способом добавить скрипт в ежедневное задание cron. Это означает, что скрипт будет выполняться каждый день. | ||
По сути, он выполняет эту команду: | |||
logrotate /etc/logrotate.conf | logrotate /etc/logrotate.conf | ||
Когда logrotate.conf проходит через свой список команд - он вызывает эту команду: | |||
include /etc/logrotate.d | include /etc/logrotate.d | ||
Это означает что все скрипты, находящиеся внутри '''/etc/logrotate.d''', также будут запущены. | |||
This brings us to the second step (above), where we created '''/etc/logrotate.d/rotate.logs''' . This script will be run everyday. The comments I added to the rotate.logs file above give a general idea of what it does. You can delete, modify & add to that script, but do it carefully. | This brings us to the second step (above), where we created '''/etc/logrotate.d/rotate.logs''' . This script will be run everyday. The comments I added to the rotate.logs file above give a general idea of what it does. You can delete, modify & add to that script, but do it carefully. |