public-inbox.git  about / heads / tags
an "archives first" approach to mailing lists
blob 4dd2f5d7a8862d0abc6809527bef80825d50bf32 1293 bytes (raw)
$ git show p516-leak:examples/public-inbox-nntpd@.service	# shows this blob on the CLI

 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
33
34
35
36
37
38
39
40
 
# ==> /etc/systemd/system/public-inbox-nntpd@.service <==
# Since SIGUSR2 upgrades do not work under systemd, this service file
# allows starting two simultaneous services during upgrade time
# (e.g. public-inbox-nntpd@1 public-inbox-nntpd@2) with the intention
# that they take turns running in-between upgrades.  This should
# allow upgrading without downtime.

[Unit]
Description = public-inbox NNTP server %i
Wants = public-inbox-nntpd.socket public-inbox-nntps.socket
After = public-inbox-nntpd.socket public-inbox-nntps.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-nntpd \
-1 /var/log/public-inbox/nntpd.out.log \
--cert /etc/ssl/certs/news.example.com.pem \
--key /etc/ssl/private/news.example.com.key
StandardError = syslog

# NonBlocking is REQUIRED to avoid a race condition if running
# simultaneous services
NonBlocking = true

Sockets = public-inbox-nntpd.socket public-inbox-nntps.socket

KillSignal = SIGQUIT
User = nobody
Group = ssl-cert
ExecReload = /bin/kill -HUP $MAINPID
TimeoutStopSec = 86400
KillMode = process

[Install]
WantedBy = multi-user.target

git clone https://public-inbox.org/public-inbox.git
git clone http://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/public-inbox.git