From b2c0df4da9317c1dbfaacdfb1b2af2f0d08afaef Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 11 Aug 2022 20:13:09 +0000 Subject: examples: consolidate systemd socket examples systemd.socket(5) files can actually contain multiple listen sockets, so shave down inode overhead and simplify config file management by consolidating all applicable ports into a single file for each daemon. --- examples/public-inbox-nntpd.socket | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'examples/public-inbox-nntpd.socket') diff --git a/examples/public-inbox-nntpd.socket b/examples/public-inbox-nntpd.socket index eeddf343..0a3ccb2f 100644 --- a/examples/public-inbox-nntpd.socket +++ b/examples/public-inbox-nntpd.socket @@ -1,9 +1,23 @@ # ==> /etc/systemd/system/public-inbox-nntpd.socket <== +# This contains 5 sockets for an public-inbox-nntpd instance. +# The TCP ports are well-known ports registered in /etc/services. +# The /run/nntpd.onion.sock entry is meant for the Tor hidden service +# enabled by the following line in the torrc(5) file: +# HiddenServicePort 119 unix:/run/nntpd.onion.sock [Unit] -Description = public-inbox-nntpd socket +Description = public-inbox-nntpd sockets [Socket] -ListenStream = 119 +ListenStream = 0.0.0.0:119 +ListenStream = 0.0.0.0:563 +ListenStream = /run/nntpd.onion.sock + +# Separating IPv4 from IPv6 listeners makes for nicer output +# of IPv4 addresses in various reporting/monitoring tools +BindIPv6Only = ipv6-only +ListenStream = [::]:119 +ListenStream = [::]:563 + Service = public-inbox-nntpd@1.service [Install] -- cgit v1.2.3-24-ge0c7