[Koha-devel] Replace some koha-* scripts that use "daemon" with systemd unit files
dcook at prosentient.com.au
dcook at prosentient.com.au
Thu Jun 4 08:10:29 CEST 2020
I've got a local package installing a systemd template unit file at
/etc/systemd/system/koha-mq-scheduler at .service. Now all it takes it
"systemctl start koha-mq-scheduler at INSTANCE.service" to start, but in
hindsight it actually makes sense to use koha-mq-scheduler script to handle
--enable, --disable, --start, --restart, and --stop.
So I guess keeping the koha-* scripts makes sense but swapping out "daemon"
with systemd template unit files instead.
I suppose one thing to keep in mind is "adjust_paths_dev_install". I'm not
familiar with that functionality.
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Online: 02 8005 0595
From: Koha-devel <koha-devel-bounces at lists.koha-community.org> On Behalf Of
dcook at prosentient.com.au
Sent: Thursday, 4 June 2020 12:31 PM
To: 'Koha Devel' <koha-devel at lists.koha-community.org>
Cc: 'Victor Grousset' <victor.grousset at biblibre.com>
Subject: [Koha-devel] Replace some koha-* scripts that use "daemon" with
systemd unit files
Hi all,
What do people think about replacing some of the koha-* script files with
systemd unit files?
I'm creating a service for a RabbitMQ-based task scheduler and my unit file
is 17 declarative configuration lines. Creating a koha-mq-scheduler file
looks like it'll be hundreds of lines of shell script code.
My unit file is actually a "template" file, which means I have 1 file in
/etc/systemd/system/koha-mq-scheduler at .service
<mailto:/etc/systemd/system/koha-mq-scheduler at .service> and I can just
invoke "systemctl start koha-mq-scheduler at INSTANCE.service
<mailto:koha-mq-scheduler at INSTANCE.service> " to start the service. You can
use the %i placeholder in the unit file and it will be replaced with
INSTANCE, so you can set paths, environmental variables, et cetera very
easily. It's so easy and convenient.
I think all modern Linux OSes use systemd for their init system, so I think
it would be pretty safe to use.
I'm happy to work on this one, but I guess I'd like to see if other people
have interest in this.
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Online: 02 8005 0595
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200604/aaa9a104/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 484 bytes
Desc: not available
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20200604/aaa9a104/attachment.sig>
More information about the Koha-devel
mailing list