]> Sergey Matveev's repositories - public-inbox.git/blob - examples/public-inbox-nntpd@.service
lei_mail_sync: store OIDs and Maildir filenames as blobs
[public-inbox.git] / examples / public-inbox-nntpd@.service
1 # ==> /etc/systemd/system/public-inbox-nntpd@.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-nntpd@1 public-inbox-nntpd@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 NNTP server %i
10 Wants = public-inbox-nntpd.socket public-inbox-nntps.socket
11 After = public-inbox-nntpd.socket public-inbox-nntps.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-nntpd \
21 -1 /var/log/public-inbox/nntpd.out.log \
22 --cert /etc/ssl/certs/news.example.com.pem \
23 --key /etc/ssl/private/news.example.com.key
24 StandardError = syslog
25
26 # NonBlocking is REQUIRED to avoid a race condition if running
27 # simultaneous services
28 NonBlocking = true
29
30 Sockets = public-inbox-nntpd.socket public-inbox-nntps.socket
31
32 KillSignal = SIGQUIT
33 User = nobody
34 Group = ssl-cert
35 ExecReload = /bin/kill -HUP $MAINPID
36 TimeoutStopSec = 86400
37 KillMode = process
38
39 [Install]
40 WantedBy = multi-user.target