[tryton-debian] trytond-cron service

Priit Laes plaes at plaes.org
Tue Jan 16 14:31:39 UTC 2018


On Tue, Jan 16, 2018 at 02:52:16PM +0100, Mathias Behrle wrote:
> * Maxime Richez: " [tryton-debian] trytond-cron service" (Tue, 16 Jan 2018
>   14:18:22 +0100):
> 
> Hello Maxime,
> 
> > Hi Mathias,
> > 
> > Wondering in your package how is working trytond-cron service.
> > 
> > In the file tryton-server-cron.service, there's no database specified in 
> > ExecStart command:
> > 
> > [Service]
> > User=tryton
> > Group=tryton
> > ExecStart=/usr/bin/trytond-cron --config /etc/tryton/trytond.conf 
> > --logconf /etc/tryton/trytond_log.conf
> > Restart=on-failure
> > 
> > In Tryton Cron Service documentation, command line needs the database:
> > 
> > trytond-cron  -c  <config  file>  -d  <database>
> > 
> > Thanks for explanations!
> > 
> > Maxx.
> 
> You are completely right and the service file doesn't make much sense like it
> is. Since at installation time we can not know which databases should be
> targeted by the cron service it must be defined manually later.
> For your immediate needs just add the -d parameter for your databases and you
> should be done.
> 
> I think I will move the cron service file as an example to docs with
> installation instructions in the README.

It could be implemented like the foo at .service

[Unit]
Description=Cron service for tryton - %i

[Service]
User=tryton
Group=tryton
ExecStart=/usr/bin/trytond-cron --config /etc/tryton/trytond.conf --logconf /etc/tryton/trytond_log.conf -d %i
Restart=on-failure

And then:

systemctl enable tryton-cron at database.service

> > [Service]
> > User=tryton
> > Group=tryton
> > ExecStart=/usr/bin/trytond-cron --config /etc/tryton/trytond.conf 
> > --logconf /etc/tryton/trytond_log.conf
> > Restart=on-failure

> 
> Mathias
> 
> 
> 
> -- 
> 
>     Mathias Behrle
>     PGP/GnuPG key availabable from any keyserver, ID: 0xD6D09BE48405BBF6
>     AC29 7E5C 46B9 D0B6 1C71  7681 D6D0 9BE4 8405 BBF6
> 
> _______________________________________________
> tryton-debian mailing list
> tryton-debian at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/tryton-debian



More information about the tryton-debian mailing list