48 lines
1.3 KiB
Desktop File
48 lines
1.3 KiB
Desktop File
[Unit]
|
|
Description=Koha Plack server for %i
|
|
Documentation=man:koha-plack(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=forking
|
|
User=%i-koha
|
|
Group=%i-koha
|
|
SyslogIdentifier=%i-koha-plack
|
|
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
|
|
PIDFile=/run/koha/%i/plack.pid
|
|
ExecStartPre=+/usr/sbin/koha-generate-env plack %i
|
|
EnvironmentFile=-/run/koha/%i/plack.env
|
|
ExecStart=/usr/bin/starman \
|
|
-M FindBin \
|
|
--max-requests ${PLACK_MAX_REQUESTS} \
|
|
--workers ${PLACK_WORKERS} \
|
|
--pid /run/koha/%i/plack.pid \
|
|
--daemonize \
|
|
--access-log /var/log/koha/%i/plack.log \
|
|
--error-log /var/log/koha/%i/plack-error.log \
|
|
-E ${PLACK_ENVIRONMENT} \
|
|
--listen /run/koha/%i/plack.sock \
|
|
${PLACK_PSGIFILE}
|
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
# Starman shuts down gracefully on QUIT (TERM is immediate); matches the
|
|
# QUIT/30/KILL/5 retry schedule the SysV path used.
|
|
KillSignal=SIGQUIT
|
|
TimeoutStopSec=30s
|
|
ProtectSystem=full
|
|
ProtectHome=yes
|
|
PrivateTmp=yes
|
|
NoNewPrivileges=yes
|
|
Restart=on-failure
|
|
RestartSec=5s
|
|
|
|
[Install]
|
|
WantedBy=koha@%i.target
|