something in that direction, or ? # cat /etc/cron.daily/sa-update #!/bin/sh # /usr/bin/sa-update && /etc/init.d/spamd reload 1>/dev/null
I'm a little worried about enabling this out-of-the-box, because some configuration will probably be necessary. I guess we could install it without its +x bit by default. For example, my cron job looks like, # First, redirect stdout to /dev/null. exec 1>/dev/null # This thing spits out its progress to stderr. sa-update 2>/dev/null # Exit code 0 means new updates were installed. Exit code 1 means we # were already up-to-date. Anything else is failure. if [ $? -eq 0 ]; then sa-compile /etc/init.d/amavisd reload fi But you're using spamd, so that last "reload" command would be different for you. I'm thinking I could put both in the cron job, commented out, and then we could tell users to pick the right reload command and then mark the cron job +x.
well, your script looks much more sophisticated - my is just quick & dirty - it just works, so feel free to release a better one than in comment #0
(In reply to Toralf Förster from comment #2) > well, your script looks much more sophisticated - my is just quick & dirty - > it just works, so feel free to release a better one than in comment #0 Another option to consider is a wiki page. Right now we have a big ugly postinst message that nobody reads, but we could replace that with a one-line link to the wiki. Then all of the information about cron jobs and whatnot could go there.
BTW I'm pretty sure sa-update in the mean while doesn't print to stderr, b/c I do use this cron job since years :and would otherwise being informed via email.
(In reply to Toralf Förster from comment #4) > BTW I'm pretty sure sa-update in the mean while doesn't print to stderr, b/c > I do use this cron job since years :and would otherwise being informed via > email. Huh. I added that line because it was always emailing me output. Not every time, but maybe once a week I would get a progress bar or something like that emailed to me *shrug*. I wrote a wiki page: https://wiki.gentoo.org/wiki/SpamAssassin I'll probably replace our postinst elog messages with that, and then if users can contribute e.g. systemd commands for the cron job it will be a lot easier to update.
Ok, here we go: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd452f87c73fb1dfb3050d980cdbf53f0382b216 Just set USE=cron. I got some mailing list feedback on how to make it work with systemd (thanks Rich and J. García).