]> Sergey Matveev's repositories - sgblog.git/commitdiff
Example UCSPI/daemontools configuration
authorSergey Matveev <stargrave@stargrave.org>
Sat, 1 May 2021 13:24:01 +0000 (16:24 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 1 May 2021 13:24:01 +0000 (16:24 +0300)
README.texi

index 74480adf2b13b79de2e4a285f63ab67dea1b9748..a3de85bb05c804d9dcf073de0de8323781c3c3e3 100644 (file)
@@ -22,9 +22,10 @@ Its main competitive features:
 @item Single small @url{https://hjson.github.io/, Hjson} configuration file
 @item Uses @url{https://en.wikipedia.org/wiki/Common_Gateway_Interface, CGI}
     interface (simplicity, remember?) for dealing with HTTP-server
-@item Uses @url{https://en.wikipedia.org/wiki/Inetd, inetd} interface
-    for working as @url{https://en.wikipedia.org/wiki/Gopher_(protocol), Gopher}
-    server
+@item Uses
+    @url{https://en.wikipedia.org/wiki/Inetd, inetd}/@url{http://cr.yp.to/ucspi-tcp.html, UCSPI-TCP}
+    interface for working as
+    @url{https://en.wikipedia.org/wiki/Gopher_(protocol), Gopher} server
 @item Topics (tags/categories) support
 @item Supports on the fly generation of
     @url{https://en.wikipedia.org/wiki/Atom_(feed), Atom} feeds
@@ -111,6 +112,12 @@ add/change comments with commands like:
 $ git notes --ref=topics add -m "linux hate" @@
 @end example
 
+To reset incorrectly added topic:
+
+@example
+$ git update-ref refs/notes/topics refs/notes/topics^
+@end example
+
 @node Installation
 @unnumbered Installation
 
@@ -125,7 +132,7 @@ $ go get go.stargrave.org/sgblog/cmd/sgblog-comment-add # if you need commenting
 Unfortunately by default it uses HTTPS and Go's third party servers
 (@code{sum.golang.org}, @code{proxy.golang.org}) that trust neither
 @code{CACert.org}'s CA (used previously) nor @code{ca.cypherpunks.ru}
-CA. So either disable their usage and trust that certificate:
+CAs. So either disable their usage and trust that certificate:
 @code{GOPRIVATE=go.stargrave.org/sgblog}, or clone its source code
 manually and build in place:
 @url{git://git.stargrave.org/sgblog.git},
@@ -154,10 +161,34 @@ by placing @code{lighttpd} user into @code{git} group.
 Example @command{inetd} configuration (for phlog):
 
 @example
-gopher stream tcp  nowait lighttpd /path/to/sgblog sgblog -gopher /path/to/gopher.hjson
 gopher stream tcp6 nowait lighttpd /path/to/sgblog sgblog -gopher /path/to/gopher.hjson
 @end example
 
+Example @command{UCSPI-TCP} service running under
+@url{http://cr.yp.to/daemontools.html, daemontools}:
+
+@example
+# mkdir -p /var/service/.phlog-ipv6/log
+# cd /var/service/.phlog-ipv6
+
+# cat > run <<EOF
+#!/bin/sh -e
+uid=\`id -u lighttpd\`
+gid=\`id -g git\`
+addr=2001::123
+exec tcpserver -DRH -u $uid -g $gid -l 0 $addr gopher \
+  sgblog -gopher /path/to/gopher.hjson
+EOF
+
+# cat > log/run <<EOF
+#!/bin/sh -e
+exec setuidgid whatever-user multilog t ./main
+EOF
+
+# chmod -R 755 /var/service/.phlog-ipv6
+# mv /var/service/.phlog-ipv6 /var/service/phlog-ipv6
+@end example
+
 For comments workability you have to configure your SMTP server to feed
 incoming messages to @command{sgblog-comment-add} utility. For example,
 Postfix'es @file{/etc/aliases} can contain: