]> git.donarmstrong.com Git - debian/debian-policy.git/blobdiff - policy.sgml
Merge branch 'master' into bug445203-rra
[debian/debian-policy.git] / policy.sgml
index 0b3c1a1db56066b4f49f8ca19d5fe771aa20e629..851ac0464dabbb86ec03b90fa094f9e6d98eebf7 100644 (file)
@@ -7895,11 +7895,13 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq
        </p>
 
        <p>
-         Log files must be rotated occasionally so that they don't
-         grow indefinitely; the best way to do this is to drop a log
-         rotation configuration file into the directory
-         <file>/etc/logrotate.d</file> and use the facilities provided by
-         logrotate.<footnote>
+         Log files must be rotated occasionally so that they don't grow
+         indefinitely.  The best way to do this is to install a log
+         rotation configuration file in the
+         directory <file>/etc/logrotate.d</file>, normally
+         named <file>/etc/logrotate.d/<var>package</var></file>, and use
+         the facilities provided by <prgn>logrotate</prgn>.
+         <footnote>
            <p>
              The traditional approach to log files has been to set up
              <em>ad hoc</em> log rotation schemes using simple shell
@@ -7924,17 +7926,20 @@ ln -fs ../sbin/sendmail debian/tmp/usr/bin/runq
            section="8">):
          <example compact="compact">
 /var/log/foo/*.log {
-rotate 12
-weekly
-compress
-postrotate
-/etc/init.d/foo force-reload
-endscript
+    rotate 12
+    weekly
+    compress
+    missingok
+    postrotate
+        start-stop-daemon -K -p /var/run/foo.pid -s HUP -x /usr/sbin/foo -q
+    endscript
 }
          </example>
          This rotates all files under <file>/var/log/foo</file>, saves 12
-         compressed generations, and forces the daemon to reload its
-         configuration information after the log rotation.
+         compressed generations, and tells the daemon to reopen its log
+         files after the log rotation.  It skips this log rotation
+         (via <tt>missingok</tt>) if no such log file is present, which
+         avoids errors if the package is removed but not purged.
        </p>
 
        <p>