From 4830faf0dfc2eee5733c1174e78e63a6e157898d Mon Sep 17 00:00:00 2001 From: David Cook Date: Tue, 6 Oct 2020 06:33:05 +0000 Subject: [PATCH] Bug 26363: Provide a systemd unit file for koha-worker in package installs While the packages already have a koha-zebra script that creates a service using the 'daemon' utility, this unit file template provides an alternative. Note that currently you'd have to start the service using the following: ```systemctl start koha-worker@NAME.service``` Where NAME is the name of your Koha instance. The systemctl enable/start commands could be automated more with helper scripts in debian/scripts, but this is a first step. Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Martin Renvoize --- debian/templates/koha-worker@.service | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 debian/templates/koha-worker@.service diff --git a/debian/templates/koha-worker@.service b/debian/templates/koha-worker@.service new file mode 100644 index 0000000000..e209aa6a48 --- /dev/null +++ b/debian/templates/koha-worker@.service @@ -0,0 +1,18 @@ +# koha-worker@.service +# /etc/systemd/system/koha-worker@.service +[Unit] +Description=Koha Task Queue Worker +After=syslog.target network.target + +[Service] +Environment=PERL5LIB=/usr/share/koha/lib +Environment=KOHA_CONF=/etc/koha/sites/%i/koha-conf.xml +ExecStart=/usr/share/koha/bin/background_jobs_worker.pl +Restart=on-failure +RestartSec=5s +StartLimitBurst=3 +StartLimitInterval=60 +SyslogIdentifier=koha-worker_%i + +[Install] +WantedBy=multi-user.target -- 2.20.1