Browse Source
This patch adds a systemd unit file which gets rewritten according to the configuration specified by Makefile.PL. This can be linked or copied to systemd directories for running a systemd service for background_jobs_worker.pl Test plan: 1. perl Makefile.PL 1a. Choose "single" installation 1b. Choose "/opt/koha" for a file path 2. make 3. vi blib/KOHA_CONF_DIR/koha-worker.service 4. Verify that PERL5LIB, KOHA_CONF, ExecStart, and SyslogIdentifier all appear to be correctly filled in Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>21.05.x
2 changed files with 18 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||
# koha-worker.service |
|||
[Unit] |
|||
Description=Koha Task Queue Worker |
|||
After=syslog.target network.target |
|||
|
|||
[Service] |
|||
Environment=PERL5LIB=__PERL_MODULE_DIR__ |
|||
Environment=KOHA_CONF=__KOHA_CONF_DIR__/koha-conf.xml |
|||
ExecStart=__SCRIPT_DIR__/background_jobs_worker.pl |
|||
Restart=on-failure |
|||
RestartSec=5s |
|||
StartLimitBurst=3 |
|||
StartLimitInterval=60 |
|||
SyslogIdentifier=koha-worker-__DB_NAME__ |
|||
|
|||
[Install] |
|||
WantedBy=multi-user.target |
Loading…
Reference in new issue