about summary refs log tree commit homepage
path: root/examples/public-inbox-httpd@.service
blob: 56117ef09368405ac21683d62b33d14edfda0c63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# ==> /etc/systemd/system/public-inbox-httpd@.service <==
# Since SIGUSR2 upgrades do not work under systemd, this service file
# allows starting two simultaneous services during upgrade time
# (e.g. public-inbox-httpd@1 public-inbox-httpd@2) with the intention
# that they take turns running in-between upgrades.  This should
# allow upgrading without downtime.

[Unit]
Description = public-inbox PSGI server %i
Wants = public-inbox-httpd.socket
After = public-inbox-httpd.socket

[Service]
Environment = PI_CONFIG=/home/pi/.public-inbox/config \
PATH=/usr/local/bin:/usr/bin:/bin \
PERL_INLINE_DIRECTORY=/tmp/.pub-inline

LimitNOFILE = 30000
ExecStartPre = /bin/mkdir -p -m 1777 /tmp/.pub-inline
ExecStart = /usr/local/bin/public-inbox-httpd \
-1 /var/log/public-inbox/httpd.out.log
StandardError = syslog
Sockets = public-inbox-httpd.socket
KillSignal = SIGQUIT
User = nobody
Group = nogroup
ExecReload = /bin/kill -HUP $MAINPID
TimeoutStopSec = 86400
KillMode = process

[Install]
WantedBy = multi-user.target