Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337511 - media-sound/mpd: logrotate support
Summary: media-sound/mpd: logrotate support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Christoph Mende (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-15 16:46 UTC by DEMAINE Benoît-Pierre, aka DoubleHP
Modified: 2013-04-10 12:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description DEMAINE Benoît-Pierre, aka DoubleHP 2010-09-15 16:46:25 UTC
proposed /etc/logrotate.d/mpd:

# MPD logrotate snipet for Gentoo Linux
#
/var/log/mpd/*log {
  missingok
  postrotate
  /etc/init.d/mpd restart > /dev/null 2>&1 || true
  endscript
}

(untested yet)
ATM:
ls -lh /var/log/mpd/
total 39M
-rw-r--r--  1 root root   39M Sep 15 17:12 mpd.log

since january ...
Comment 1 Mr. Bones. (RETIRED) gentoo-dev 2010-09-15 18:52:33 UTC
the logrotate flag is deprecated.  packages should just install the logrotate snippet unconditionally.
Comment 2 DEMAINE Benoît-Pierre, aka DoubleHP 2010-09-15 18:56:15 UTC
Feel free to merge the proposed file with or without flag :)

side issue: if mpd is installed, but not configured to start at boot time, this will start it anyway ... so, the restart line should be changed to sth like
/etc/init.d/mpd status | grep started && ...

This bug of course depends on bug 336615
Comment 3 Christoph Mende (RETIRED) gentoo-dev 2013-04-10 12:13:08 UTC
mpd-0.17 adds the ability to start a new log file on SIGHUP. 0.17.4-r2 and newer install a logrotate file similar to yours.