]> Sergey Matveev's repositories - public-inbox.git/blob - examples/public-inbox-nntpd@.service
treewide: replace /^I: / prefix with /^# /
[public-inbox.git] / examples / public-inbox-nntpd@.service
1 # ==> /etc/systemd/system/public-inbox-nntpd@.service <==
2 # Consider looking at public-inbox-netd@.service instead of this file
3 # to simplify management when serving multiple protocols.
4 #
5 # Since SIGUSR2 upgrades do not work under systemd, this service file
6 # allows starting two simultaneous services during upgrade time
7 # (e.g. public-inbox-nntpd@1 public-inbox-nntpd@2) with the intention
8 # that they take turns running in-between upgrades.  This should
9 # allow upgrading without downtime.
10
11 [Unit]
12 Description = public-inbox NNTP server %i
13 Wants = public-inbox-nntpd.socket
14 After = public-inbox-nntpd.socket
15
16 [Service]
17 Environment = PI_CONFIG=/home/pi/.public-inbox/config \
18 PATH=/usr/local/bin:/usr/bin:/bin \
19 PERL_INLINE_DIRECTORY=/tmp/.pub-inline
20
21 LimitNOFILE = 30000
22 ExecStartPre = /bin/mkdir -p -m 1777 /tmp/.pub-inline
23 ExecStart = /usr/local/bin/public-inbox-nntpd \
24 -1 /var/log/public-inbox/nntpd.out.log \
25 --cert /etc/ssl/certs/news.example.com.pem \
26 --key /etc/ssl/private/news.example.com.key
27 StandardError = syslog
28
29 # NonBlocking is REQUIRED to avoid a race condition if running
30 # simultaneous services
31 NonBlocking = true
32
33 Sockets = public-inbox-nntpd.socket
34
35 KillSignal = SIGQUIT
36 User = nobody
37 Group = ssl-cert
38 ExecReload = /bin/kill -HUP $MAINPID
39 TimeoutStopSec = 86400
40 KillMode = process
41
42 [Install]
43 WantedBy = multi-user.target