https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26363

--- Comment #18 from David Cook <[email protected]> ---
(In reply to Jonathan Druart from comment #17)
> 1. Those 2 lines are not equivalent:
>   debian/templates/[email protected]:SyslogIdentifier=koha-worker_%i
>   etc/koha-worker.service:SyslogIdentifier=koha-worker-__DB_NAME__
> 

That's because [email protected] is a template file. When invoked using
```systemctl start [email protected]```, %i will have NAME in it. This
could be used by koha-create.

For source installs, I was thinking that people would just copy or symlink the
built file from the Koha installation directory to /etc/systemd/system, so
they'd want to have the name hard-coded into the unit file. We could use a
systemd template for source installs too and then just given an instruction to
copy the template to /etc/systemd/system and then use ```systemctl start
[email protected]```. It would make things more consistent.

> 2. Should not it be $instance-koha-worker instead, to match what we have in:
> debian/scripts/koha-functions.sh:    if daemon
> --name="$instancename-koha-worker" \

I don't understand the question. What do you mean by "it" in your question? The
SyslogIdentifier could be done like $instancename-koha-worker, but not the
systemd unit. It needs to start with a set name. 

Here's an example that I use locally already:

systemctl status "koha-mq*"
● [email protected] - Koha Message Queue Work Scheduler
   Loaded: loaded (/etc/systemd/system/[email protected]; indirect;
vendor preset: enabled)
   Active: active (running) since Sun 2020-11-22 19:33:35 AEDT; 3 days ago
 Main PID: 23226 (mq_scheduler.pl)
    Tasks: 1 (limit: 4915)
   CGroup:
/system.slice/system-koha\x2dmq\x2dscheduler.slice/[email protected]
           └─23226 /usr/bin/perl
/usr/share/koha/bin/prosentient/mq_scheduler.pl -v

Nov 22 19:33:35 koha1911 systemd[1]: Started Koha Message Queue Work Scheduler.

At the moment, I only have one koha-mq-scheduler unit running on that server,
but if there were others, that systemctl command would've listed them all.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to