Re: cron sa-update with multipe channels

2016-09-17 Thread Martin Gregorie
On Sat, 2016-09-17 at 19:20 +0100, RW wrote:
> On Sat, 17 Sep 2016 11:52:16 +0200
> Marcus Schopen wrote:
> 
> 
> > 
> > Thanks! But then in sa-update-hock.d dir in my case mimedefang
> > would
> > be reloaded after each channel update instead of one recompile and
> > one
> > reload after all updates finished.
> I think you'd have to write your own script. Just keep track of
> the return codes from the various invocations of sa-update and
> recompile/restart at the end of the script.
> 
The OP could also run the various updates as separate cronjobs. Each
would set a flag, i.e. create a file to indicate a successful update,
on completion. If the flag is already set it would not touch it.

A final cronjob, timed for 30 mins or so later, would do the recompile
and restart if the flag was set and then unset it.
 
That should keep the scripts simple (only one task per script) while
still only doing a single recompile/restart if at least one update was
successful.


Martin
 


Re: cron sa-update with multipe channels

2016-09-17 Thread RW
On Sat, 17 Sep 2016 11:52:16 +0200
Marcus Schopen wrote:


> Thanks! But then in sa-update-hock.d dir in my case mimedefang would
> be reloaded after each channel update instead of one recompile and one
> reload after all updates finished.

I think you'd have to write your own script. Just keep track of
the return codes from the various invocations of sa-update and
recompile/restart at the end of the script.

I'm curious about what all these channels are.  Are they something
private? 


Re: cron sa-update with multipe channels

2016-09-17 Thread Marcus Schopen
Am Samstag, den 17.09.2016, 11:46 +0200 schrieb Axb:
> On 09/17/2016 11:35 AM, Marcus Schopen wrote:
> > Am Samstag, den 17.09.2016, 10:36 +0200 schrieb Axb:
> >> On 09/17/2016 10:17 AM, Marcus Schopen wrote:
> >>> Hi,
> >>>
> >>> is there a concept for updating from multiple channels
> >>> in /etc/cron.daily/spamassassin so that sa-compile is called only if one
> >>> channel got updates?
> >>
> >>
> >> /etc/cron.daily/spamassassin is not part of the SA project. It's usually
> >> something added by a distro maintainer
> >>
> >> just add conjobs for the "other" channels as per sa-update docs
> >>
> >> (http://spamassassin.apache.org/full/3.4.x/doc/sa-update.txt)
> >
> > Ah, understand. Thanks.
> >
> > If I use --channelfile to list all update servers in one file, I have a
> > problem to mix servers with gpgkey and without. Do I need to use
> > --channel for each server instead of --channelfile to be able to specify
> > --gpgkey or --nogpg or how can I mix that?
> >
> 
> I've never used --channelfile so I can't tell.
> 
> as different channels may require different update frequency, etc, I've 
> always chosen to us one cronjob per channel and/or server.
> Makes it easier to track and debug.
> 
> Maybe someone else can answer your question.

Thanks! But then in sa-update-hock.d dir in my case mimedefang would be
reloaded after each channel update instead of one recompile and one
reload after all updates finished.

Ciao!





Re: cron sa-update with multipe channels

2016-09-17 Thread Axb

On 09/17/2016 11:35 AM, Marcus Schopen wrote:

Am Samstag, den 17.09.2016, 10:36 +0200 schrieb Axb:

On 09/17/2016 10:17 AM, Marcus Schopen wrote:

Hi,

is there a concept for updating from multiple channels
in /etc/cron.daily/spamassassin so that sa-compile is called only if one
channel got updates?



/etc/cron.daily/spamassassin is not part of the SA project. It's usually
something added by a distro maintainer

just add conjobs for the "other" channels as per sa-update docs

(http://spamassassin.apache.org/full/3.4.x/doc/sa-update.txt)


Ah, understand. Thanks.

If I use --channelfile to list all update servers in one file, I have a
problem to mix servers with gpgkey and without. Do I need to use
--channel for each server instead of --channelfile to be able to specify
--gpgkey or --nogpg or how can I mix that?



I've never used --channelfile so I can't tell.

as different channels may require different update frequency, etc, I've 
always chosen to us one cronjob per channel and/or server.

Makes it easier to track and debug.

Maybe someone else can answer your question.


Re: cron sa-update with multipe channels

2016-09-17 Thread Marcus Schopen
Am Samstag, den 17.09.2016, 10:36 +0200 schrieb Axb:
> On 09/17/2016 10:17 AM, Marcus Schopen wrote:
> > Hi,
> >
> > is there a concept for updating from multiple channels
> > in /etc/cron.daily/spamassassin so that sa-compile is called only if one
> > channel got updates?
> 
> 
> /etc/cron.daily/spamassassin is not part of the SA project. It's usually 
> something added by a distro maintainer
> 
> just add conjobs for the "other" channels as per sa-update docs
> 
> (http://spamassassin.apache.org/full/3.4.x/doc/sa-update.txt)

Ah, understand. Thanks.

If I use --channelfile to list all update servers in one file, I have a
problem to mix servers with gpgkey and without. Do I need to use
--channel for each server instead of --channelfile to be able to specify
--gpgkey or --nogpg or how can I mix that?

Ciao
Marcus




Re: cron sa-update with multipe channels

2016-09-17 Thread Axb

On 09/17/2016 10:17 AM, Marcus Schopen wrote:

Hi,

is there a concept for updating from multiple channels
in /etc/cron.daily/spamassassin so that sa-compile is called only if one
channel got updates?



/etc/cron.daily/spamassassin is not part of the SA project. It's usually 
something added by a distro maintainer


just add conjobs for the "other" channels as per sa-update docs

(http://spamassassin.apache.org/full/3.4.x/doc/sa-update.txt)




cron sa-update with multipe channels

2016-09-17 Thread Marcus Schopen
Hi,

is there a concept for updating from multiple channels
in /etc/cron.daily/spamassassin so that sa-compile is called only if one
channel got updates?

Ciao
Marcus