]> Sergey Matveev's repositories - public-inbox.git/blob - examples/public-inbox-httpd@.service
run update-copyrights from gnulib for 2019
[public-inbox.git] / examples / public-inbox-httpd@.service
1 # ==> /etc/systemd/system/public-inbox-httpd@.service <==
2 # Since SIGUSR2 upgrades do not work under systemd, this service file
3 # allows starting two simultaneous services during upgrade time
4 # (e.g. public-inbox-httpd@1 public-inbox-httpd@2) with the intention
5 # that they take turns running in-between upgrades.  This should
6 # allow upgrading without downtime.
7
8 [Unit]
9 Description = public-inbox PSGI server %i
10 Wants = public-inbox-httpd.socket
11 After = public-inbox-httpd.socket
12
13 [Service]
14 Environment = PI_CONFIG=/home/pi/.public-inbox/config \
15 PATH=/usr/local/bin:/usr/bin:/bin \
16 PERL_INLINE_DIRECTORY=/tmp/.pub-inline
17
18 LimitNOFILE = 30000
19 ExecStartPre = /bin/mkdir -p -m 1777 /tmp/.pub-inline
20 ExecStart = /usr/local/bin/public-inbox-httpd \
21 -1 /var/log/public-inbox/httpd.out.log
22 StandardError = syslog
23
24 # NonBlocking is REQUIRED to avoid a race condition if running
25 # simultaneous services
26 NonBlocking = true
27 Sockets = public-inbox-httpd.socket
28
29 KillSignal = SIGQUIT
30 User = nobody
31 Group = nogroup
32 ExecReload = /bin/kill -HUP $MAINPID
33 TimeoutStopSec = 86400
34 KillMode = process
35
36 [Install]
37 WantedBy = multi-user.target