]> Pileus Git - ~andy/fetchmail/blob - contrib/fetchmail.logrotate
Merge branch 'legacy_63'
[~andy/fetchmail] / contrib / fetchmail.logrotate
1 # fetchmail.logrotate
2 #
3 # This is an example logrotate configuration file, editing required
4 # before use. It is useful if you have fetchmail logging to a separate
5 # file, /var/log/fetchmail as shown below.
6 #
7 # This file has been written for Debian Linux systems.
8 #
9 # Other systems will probably require adjustments, such as: how
10 # often to rotate, how many files to retain, how to name them, if
11 # compression is desired, which user and group the file should be
12 # created with, and where the .pid file is. Check the logrotate
13 # documentation for details.
14 #                                        --Matthias Andree, 2007-01-14
15 # ----------------------------------------------------------------------
16 # The following license applies to the remainder of this file:
17 #
18 # Copyright (c) 2007 Daniel Leidert <daniel.leidert@wgdd.de>
19 #
20 # Permission is hereby granted, free of charge, to any person obtaining
21 # a copy of this software and associated documentation files (the
22 # "Software"), to deal in the Software without restriction, including
23 # without limitation the rights to use, copy, modify, merge, publish,
24 # distribute, sublicense, and/or sell copies of the Software, and to
25 # permit persons to whom the Software is furnished to do so, subject to
26 # the following conditions:
27 #
28 # The above copyright notice and this permission notice shall be
29 # included in all copies or substantial portions of the Software.
30 #
31 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33 # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
34 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
35 # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
36 # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
37 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
38
39 /var/log/fetchmail {
40     weekly
41     rotate 5
42     compress
43     missingok
44     notifempty
45     create 640 fetchmail root
46     sharedscripts
47     postrotate
48         if [ -f /var/run/fetchmail/fetchmail.pid ]; then \
49             if [ -x /usr/sbin/invoke-rc.d ]; then \
50                 invoke-rc.d fetchmail restart > /dev/null; \
51             else \
52                 /etc/init.d/fetchmail restart > /dev/null; \
53             fi; \
54         fi;
55     endscript
56 }