36 lines
1.1 KiB
Desktop File
36 lines
1.1 KiB
Desktop File
[Unit]
|
|
Description=Koha Elasticsearch indexer daemon for %i
|
|
Documentation=man:koha-es-indexer(8)
|
|
PartOf=koha@%i.target
|
|
Requires=koha-create-dirs@%i.service
|
|
Before=koha@%i.target
|
|
After=koha-create-dirs@%i.service
|
|
StartLimitIntervalSec=60
|
|
StartLimitBurst=3
|
|
|
|
[Service]
|
|
Type=simple
|
|
User=%i-koha
|
|
Group=%i-koha
|
|
SyslogIdentifier=%i-koha-es-indexer
|
|
# Capture stdout/stderr to the same files the daemon(1) wrapper used under
|
|
# SysV, so log locations are identical whichever init package is installed.
|
|
StandardOutput=append:/var/log/koha/%i/es-indexer-output.log
|
|
StandardError=append:/var/log/koha/%i/es-indexer-error.log
|
|
WorkingDirectory=/var/lib/koha/%i
|
|
Environment=KOHA_CONF=/etc/koha/sites/%i/koha-conf.xml
|
|
Environment=KOHA_HOME=/usr/share/koha
|
|
Environment=PERL5LIB=/usr/share/koha/lib
|
|
ExecStartPre=+/usr/sbin/koha-generate-env es-indexer %i
|
|
EnvironmentFile=-/run/koha/%i/es-indexer.env
|
|
ExecStart=/usr/share/koha/bin/workers/es_indexer_daemon.pl --batch_size ${ES_BATCH_SIZE}
|
|
ProtectSystem=full
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
NoNewPrivileges=yes
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
|
|
[Install]
|
|
WantedBy=koha@%i.target
|