[Koha-devel] Replacing koha-plack, koha-start-zebra, etc with systemd services?
David Cook
dcook at prosentient.com.au
Tue Oct 23 04:45:41 CEST 2018
Hi all,
Here's what I came up with. I based the command against the koha-plack
script.
I think a person could use systemd "instances" to make some of the command
arguments more dynamic, which you'd want for a package install.
One could also explore other configuration options. I suppose we could also
have a wrapper script executed instead of executing starman directly.
Lots of possibilities!
SystemD Service File:
##################################################################
[Unit]
Description=Koha Test Plack
[Service]
ExecStart=/usr/bin/starman \
--max-requests 50 \
--workers 2 \
--access-log /opt/koha/logs/plack.log \
--error-log /opt/koha/logs/plack-error.log \
-E deployment \
--socket /opt/koha/var/plack.sock \
/opt/koha/plack.psgi
Environment=PERL5LIB=/opt/koha/lib
Environment=KOHA_CONF=/opt/koha/etc/koha-conf.xml
Environment=KOHA_HOME=/opt/koha
Restart=always
RestartSec=15
[Install]
WantedBy=multi-user.target
##################################################################
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Direct: 02 8005 0595
From: koha-devel-bounces at lists.koha-community.org
[mailto:koha-devel-bounces at lists.koha-community.org] On Behalf Of David Cook
Sent: Tuesday, 23 October 2018 1:07 PM
To: koha-devel at lists.koha-community.org
Subject: [Koha-devel] Replacing koha-plack, koha-start-zebra, etc with
systemd services?
Hi all,
I'm about to start working on a systemd service for running Plack (for a
non-package Koha install), and I was wondering if anyone else has thought
about or is using systemd services for Plack, Zebra, etc.
Mason did a great job with a systemd service
https://github.com/KohaAloha/koha-mysql-init/blob/master/koha-mysql-init.ser
vice for getting around the autoincrement issue (fixed in MySQL 8.0
https://dev.mysql.com/doc/refman/8.0/en/innodb-auto-increment-handling.html
and MariaDB 10.2.4 https://mariadb.com/kb/en/library/auto_increment/).
Anyway, once I've got something working, I'm happy to share it. Curious if
anyone has any systemd unit files they'd like to share.
David Cook
Systems Librarian
Prosentient Systems
72/330 Wattle St
Ultimo, NSW 2007
Australia
Office: 02 9212 0899
Direct: 02 8005 0595
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20181023/d031afdd/attachment-0001.html>
More information about the Koha-devel
mailing list