about summary refs log tree commit homepage
path: root/examples/yahns.socket
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-07-07 01:06:45 +0000
committerEric Wong <e@80x24.org>2016-07-07 01:13:54 +0000
commit84989a48f20d1bc383a9925b919edc66fc4bccdb (patch)
tree365cdf35b369a67f3139f1aa15f12b4b8f558373 /examples/yahns.socket
parent97ef2a9c592fbdb756aa6a73e2e6c90b6b3cda18 (diff)
downloadyahns-84989a48f20d1bc383a9925b919edc66fc4bccdb.tar.gz
Reduce raciness in the init script and add LSB tags.
However, the systemd examples should be race-free and
safer (if one feels safe using systemd :P)
Diffstat (limited to 'examples/yahns.socket')
-rw-r--r--examples/yahns.socket17
1 files changed, 17 insertions, 0 deletions
diff --git a/examples/yahns.socket b/examples/yahns.socket
new file mode 100644
index 0000000..6455b41
--- /dev/null
+++ b/examples/yahns.socket
@@ -0,0 +1,17 @@
+# ==> /etc/systemd/system/yahns.socket <==
+[Unit]
+Description = yahns sockets
+
+[Socket]
+
+# yahns can handle an arbitrary number of listen sockets,
+# so I prefer to keep listeners for IPv4 and IPv6 separate
+# to avoid ugly IPv4-mapped-IPv6 addresses for IPv4 clients:
+# (e.g ":ffff:10.0.0.1" instead of just "10.0.0.1").
+ListenStream = 0.0.0.0:443
+BindIPv6Only = ipv6-only
+ListenStream = [::]:443
+Service = yahns@1.service
+
+[Install]
+WantedBy = sockets.target