user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 0/4] doc updates and simplifications
@ 2022-08-11 20:13  7% Eric Wong
  2022-08-11 20:13  4% ` [PATCH 2/4] examples: consolidate systemd socket examples Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2022-08-11 20:13 UTC (permalink / raw)
  To: meta

I should've done -netd in 2016 when I did -httpd :x

Eric Wong (4):
  doc: drop ancient Apache and WEBrick examples
  examples: consolidate systemd socket examples
  examples: add systemd files for -netd
  doc: spell out "PROTOCOL" in examples

 Documentation/lei-blob.pod              |  2 +-
 Documentation/lei-convert.pod           |  2 +-
 Documentation/lei-import.pod            |  2 +-
 Documentation/lei-lcat.pod              |  2 +-
 Documentation/lei-q.pod                 |  2 +-
 Documentation/lei-rediff.pod            |  2 +-
 Documentation/public-inbox-daemon.pod   |  4 +-
 Documentation/public-inbox-imapd.pod    |  6 +--
 Documentation/public-inbox-netd.pod     |  4 +-
 Documentation/public-inbox-nntpd.pod    |  4 +-
 Documentation/public-inbox-pop3d.pod    |  6 +--
 MANIFEST                                |  9 +---
 examples/README                         |  4 --
 examples/apache2_cgi.conf               | 34 --------------
 examples/apache2_perl.conf              | 25 -----------
 examples/apache2_perl_old.conf          | 38 ----------------
 examples/cgi-webrick.rb                 | 25 -----------
 examples/public-inbox-httpd.socket      |  3 ++
 examples/public-inbox-httpd@.service    |  3 ++
 examples/public-inbox-imap-onion.socket | 12 -----
 examples/public-inbox-imapd.socket      | 17 ++++++-
 examples/public-inbox-imapd@.service    | 12 ++---
 examples/public-inbox-imaps.socket      | 12 -----
 examples/public-inbox-netd.socket       | 45 +++++++++++++++++++
 examples/public-inbox-netd@.service     | 60 +++++++++++++++++++++++++
 examples/public-inbox-nntpd.socket      | 21 ++++++++-
 examples/public-inbox-nntpd@.service    |  9 ++--
 examples/public-inbox-nntps.socket      | 12 -----
 28 files changed, 178 insertions(+), 199 deletions(-)
 delete mode 100644 examples/apache2_cgi.conf
 delete mode 100644 examples/apache2_perl.conf
 delete mode 100644 examples/apache2_perl_old.conf
 delete mode 100644 examples/cgi-webrick.rb
 delete mode 100644 examples/public-inbox-imap-onion.socket
 delete mode 100644 examples/public-inbox-imaps.socket
 create mode 100644 examples/public-inbox-netd.socket
 create mode 100644 examples/public-inbox-netd@.service
 delete mode 100644 examples/public-inbox-nntps.socket


^ permalink raw reply	[relevance 7%]

* [PATCH 2/4] examples: consolidate systemd socket examples
  2022-08-11 20:13  7% [PATCH 0/4] doc updates and simplifications Eric Wong
@ 2022-08-11 20:13  4% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2022-08-11 20:13 UTC (permalink / raw)
  To: meta

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.
---
 MANIFEST                                |  3 ---
 examples/public-inbox-imap-onion.socket | 12 ------------
 examples/public-inbox-imapd.socket      | 14 +++++++++++++-
 examples/public-inbox-imapd@.service    |  9 +++------
 examples/public-inbox-imaps.socket      | 12 ------------
 examples/public-inbox-nntpd.socket      | 18 ++++++++++++++++--
 examples/public-inbox-nntpd@.service    |  6 +++---
 examples/public-inbox-nntps.socket      | 12 ------------
 8 files changed, 35 insertions(+), 51 deletions(-)
 delete mode 100644 examples/public-inbox-imap-onion.socket
 delete mode 100644 examples/public-inbox-imaps.socket
 delete mode 100644 examples/public-inbox-nntps.socket

diff --git a/MANIFEST b/MANIFEST
index 196b9627..9900b776 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -134,13 +134,10 @@ examples/nginx_proxy
 examples/public-inbox-config
 examples/public-inbox-httpd.socket
 examples/public-inbox-httpd@.service
-examples/public-inbox-imap-onion.socket
 examples/public-inbox-imapd.socket
 examples/public-inbox-imapd@.service
-examples/public-inbox-imaps.socket
 examples/public-inbox-nntpd.socket
 examples/public-inbox-nntpd@.service
-examples/public-inbox-nntps.socket
 examples/public-inbox-watch.service
 examples/public-inbox.psgi
 examples/unsubscribe-milter.socket
diff --git a/examples/public-inbox-imap-onion.socket b/examples/public-inbox-imap-onion.socket
deleted file mode 100644
index 76b4e7ca..00000000
--- a/examples/public-inbox-imap-onion.socket
+++ /dev/null
@@ -1,12 +0,0 @@
-# ==> /etc/systemd/system/public-inbox-imap-onion.socket <==
-# This unit is for the corresponding line in torrc(5):
-# HiddenServicePort 143 unix:/run/imapd.onion.sock
-[Unit]
-Description = public-inbox-imap .onion socket
-
-[Socket]
-ListenStream = /run/imapd.onion.sock
-Service = public-inbox-imapd@1.service
-
-[Install]
-WantedBy = sockets.target
diff --git a/examples/public-inbox-imapd.socket b/examples/public-inbox-imapd.socket
index fcd924fd..c3c55ea1 100644
--- a/examples/public-inbox-imapd.socket
+++ b/examples/public-inbox-imapd.socket
@@ -1,11 +1,23 @@
 # ==> /etc/systemd/system/public-inbox-imapd.socket <==
+# This contains 5 sockets for an public-inbox-imapd instance.
+# The TCP ports are well-known ports registered in /etc/services.
+# The /run/imapd.onion.sock entry is meant for the Tor hidden service
+# enabled by the following line in the torrc(5) file:
+#   HiddenServicePort 143 unix:/run/imapd.onion.sock
 [Unit]
-Description = public-inbox-imapd socket
+Description = public-inbox-imapd sockets
 
 [Socket]
 ListenStream = 0.0.0.0:143
+ListenStream = 0.0.0.0:993
+ListenStream = /run/imapd.onion.sock
+
+# Separating IPv4 from IPv6 listeners makes for nicer output
+# of IPv4 addresses in various reporting/monitoring tools
 BindIPv6Only = ipv6-only
 ListenStream = [::]:143
+ListenStream = [::]:993
+
 Service = public-inbox-imapd@1.service
 
 [Install]
diff --git a/examples/public-inbox-imapd@.service b/examples/public-inbox-imapd@.service
index e0446ed3..f7428d85 100644
--- a/examples/public-inbox-imapd@.service
+++ b/examples/public-inbox-imapd@.service
@@ -7,10 +7,8 @@
 
 [Unit]
 Description = public-inbox-imapd IMAP server %i
-Wants = public-inbox-imapd.socket public-inbox-imaps.socket \
-public-inbox-imap-onion.socket
-After = public-inbox-imapd.socket public-inbox-imaps.socket \
-public-inbox-imap-onion.socket
+Wants = public-inbox-imapd.socket
+After = public-inbox-imapd.socket
 
 [Service]
 Environment = PI_CONFIG=/home/pi/.public-inbox/config \
@@ -29,8 +27,7 @@ StandardError = syslog
 # simultaneous services
 NonBlocking = true
 
-Sockets = public-inbox-imapd.socket public-inbox-imaps.socket \
-public-inbox-imap-onion.socket
+Sockets = public-inbox-imapd.socket
 
 KillSignal = SIGQUIT
 User = nobody
diff --git a/examples/public-inbox-imaps.socket b/examples/public-inbox-imaps.socket
deleted file mode 100644
index b61cc742..00000000
--- a/examples/public-inbox-imaps.socket
+++ /dev/null
@@ -1,12 +0,0 @@
-# ==> /etc/systemd/system/public-inbox-imaps.socket <==
-[Unit]
-Description = public-inbox-imaps socket
-
-[Socket]
-ListenStream = 0.0.0.0:993
-BindIPv6Only = ipv6-only
-ListenStream = [::]:993
-Service = public-inbox-imapd@1.service
-
-[Install]
-WantedBy = sockets.target
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]
diff --git a/examples/public-inbox-nntpd@.service b/examples/public-inbox-nntpd@.service
index 4dd2f5d7..d6aea067 100644
--- a/examples/public-inbox-nntpd@.service
+++ b/examples/public-inbox-nntpd@.service
@@ -7,8 +7,8 @@
 
 [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
+Wants = public-inbox-nntpd.socket
+After = public-inbox-nntpd.socket
 
 [Service]
 Environment = PI_CONFIG=/home/pi/.public-inbox/config \
@@ -27,7 +27,7 @@ StandardError = syslog
 # simultaneous services
 NonBlocking = true
 
-Sockets = public-inbox-nntpd.socket public-inbox-nntps.socket
+Sockets = public-inbox-nntpd.socket
 
 KillSignal = SIGQUIT
 User = nobody
diff --git a/examples/public-inbox-nntps.socket b/examples/public-inbox-nntps.socket
deleted file mode 100644
index fa678196..00000000
--- a/examples/public-inbox-nntps.socket
+++ /dev/null
@@ -1,12 +0,0 @@
-# ==> /etc/systemd/system/public-inbox-nntps.socket <==
-[Unit]
-Description = public-inbox-nntps socket
-
-[Socket]
-ListenStream = 0.0.0.0:563
-BindIPv6Only = ipv6-only
-ListenStream = [::]:563
-Service = public-inbox-nntpd@1.service
-
-[Install]
-WantedBy = sockets.target

^ permalink raw reply related	[relevance 4%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2022-08-11 20:13  7% [PATCH 0/4] doc updates and simplifications Eric Wong
2022-08-11 20:13  4% ` [PATCH 2/4] examples: consolidate systemd socket examples Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).