Ludovic Courtès writes: Hi! >> I made an attempt at a simple version of such a service. Its currently >> just copying rc and writing a daily/weekly, find a working example >> attached. > > Great! Comments below. Thanks...new patch attached! > It’s possible to make it so that users only need to write: > > (mcron-service) (rottlog-service) Nice; done! >> +(define-record-type* > It should also have a ‘rottlog’ field, to specify the rottlog package > being used. Ok. > I think it’d be best to let the user pass the files, and put them in > /etc/rottlog by extending ‘etc-service-type’. Ah, yes. That's a good idea. > Thus, this would also extend mcron-service-type and etc-service-type. Okay. > >> +(define* (rottlog-service #:key (period 'daily) (initialize? #t)) >> + (service rottlog-service-type >> + (rottlog-configuration (period period) >> + (initialize? initialize?)))) > > The configuration probably contain something like an list of name/config > pairs as well as an ‘rc’ file, along these lines: > > (rottlog-configuration > (periods `(("weekly" . ,(file-append rottlog "/etc/weekly)) > ("daily" . ,(plain-file "daily" "…")))) > (rc-file (file-append rottlog "/etc/rc"))) I think I have this too now. > Of course we should provide default config values that take care of > common files such as /var/log/{messages,Xorg.0.log} in a reasonable way. Hmm, yes. Input appreciated here! Currently I just use the rottlog defaults except for using daily instead of weekly rotations, only rotating /var/log/messages. On my box, that seems to be the only file that really needs rotation atm. Is that sane? > WDYT? Very nice, I think we're a lot closer now. Greetings, Jan