Fossil SCM

Assorted small tweaks to server docs, mainly around new systemd material.

wyoung 2019-08-19 09:47 server-docs
Commit 9d4a478241c5511451d5be0678d2d171430649764825f9bed0ee014f8fc5dd44
--- www/server/debian/service.md
+++ www/server/debian/service.md
@@ -78,11 +78,11 @@
7878
7979
8080
## Socket Activation
8181
8282
Another useful method to serve a Fossil repo via `systemd` is via a
83
-“socket listener,” though `systemd` calls it “[socket activation][sa]”.
83
+socket listener, which `systemd` calls “[socket activation][sa].”
8484
It’s more complicated, but it has some nice properties. It is the
8585
feature that allows `systemd` to replace `inetd`, `xinetd`, Upstart, and
8686
several other competing technologies.
8787
8888
We first need to define the privileged socket listener by writing
@@ -126,27 +126,25 @@
126126
[Install]
127127
WantedBy=sockets.target
128128
WantedBy=multi-user.target
129129
```
130130
131
-The name change, adding the `@` tells `systemd` this is an “instantiated
132
-service”, meaning that it will create a separate copy of the service
133
-each time it’s called upon. We’ll show the effect of this below.
131
+We’ll explain the “`@`” in the file name below.
134132
135133
Notice that we haven’t told `systemd` which user and group to run Fossil
136134
under. Since this is a system-level service definition, that means it
137135
will run as root, which then causes Fossil to [automatically drop into a
138136
`chroot(2)` jail](../../chroot.md) rooted at the `WorkingDirectory`
139
-we’ve configured above.
137
+we’ve configured above, shortly each `fossil http` call starts.
140138
141139
The `Restart*` directives we had in the user service configuration above
142
-are unnecessary, since Fossil isn’t supposed to remain running under
143
-this configuration. Each HTTP hit starts one Fossil instance, which
144
-handles the client’s request and then immediately shuts down.
140
+are unnecessary for this method, since Fossil isn’t supposed to remain
141
+running under it. Each HTTP hit starts one Fossil instance, which
142
+handles that single client’s request and then immediately shuts down.
145143
146
-Next, you need to tell `systemd` to reload its configuration files and
147
-enable the listening socket:
144
+Next, you need to tell `systemd` to reload its system-level
145
+configuration files and enable the listening socket:
148146
149147
$ sudo systemctl daemon-reload
150148
$ sudo systemctl enable fossil.socket
151149
152150
And now you can manipulate the socket listener:
153151
--- www/server/debian/service.md
+++ www/server/debian/service.md
@@ -78,11 +78,11 @@
78
79
80 ## Socket Activation
81
82 Another useful method to serve a Fossil repo via `systemd` is via a
83 “socket listener,” though `systemd` calls it “[socket activation][sa]”.
84 It’s more complicated, but it has some nice properties. It is the
85 feature that allows `systemd` to replace `inetd`, `xinetd`, Upstart, and
86 several other competing technologies.
87
88 We first need to define the privileged socket listener by writing
@@ -126,27 +126,25 @@
126 [Install]
127 WantedBy=sockets.target
128 WantedBy=multi-user.target
129 ```
130
131 The name change, adding the `@` tells `systemd` this is an “instantiated
132 service”, meaning that it will create a separate copy of the service
133 each time it’s called upon. We’ll show the effect of this below.
134
135 Notice that we haven’t told `systemd` which user and group to run Fossil
136 under. Since this is a system-level service definition, that means it
137 will run as root, which then causes Fossil to [automatically drop into a
138 `chroot(2)` jail](../../chroot.md) rooted at the `WorkingDirectory`
139 we’ve configured above.
140
141 The `Restart*` directives we had in the user service configuration above
142 are unnecessary, since Fossil isn’t supposed to remain running under
143 this configuration. Each HTTP hit starts one Fossil instance, which
144 handles the client’s request and then immediately shuts down.
145
146 Next, you need to tell `systemd` to reload its configuration files and
147 enable the listening socket:
148
149 $ sudo systemctl daemon-reload
150 $ sudo systemctl enable fossil.socket
151
152 And now you can manipulate the socket listener:
153
--- www/server/debian/service.md
+++ www/server/debian/service.md
@@ -78,11 +78,11 @@
78
79
80 ## Socket Activation
81
82 Another useful method to serve a Fossil repo via `systemd` is via a
83 socket listener, which `systemd` calls “[socket activation][sa].”
84 It’s more complicated, but it has some nice properties. It is the
85 feature that allows `systemd` to replace `inetd`, `xinetd`, Upstart, and
86 several other competing technologies.
87
88 We first need to define the privileged socket listener by writing
@@ -126,27 +126,25 @@
126 [Install]
127 WantedBy=sockets.target
128 WantedBy=multi-user.target
129 ```
130
131 We’ll explain the “`@`” in the file name below.
 
 
132
133 Notice that we haven’t told `systemd` which user and group to run Fossil
134 under. Since this is a system-level service definition, that means it
135 will run as root, which then causes Fossil to [automatically drop into a
136 `chroot(2)` jail](../../chroot.md) rooted at the `WorkingDirectory`
137 we’ve configured above, shortly each `fossil http` call starts.
138
139 The `Restart*` directives we had in the user service configuration above
140 are unnecessary for this method, since Fossil isn’t supposed to remain
141 running under it. Each HTTP hit starts one Fossil instance, which
142 handles that single client’s request and then immediately shuts down.
143
144 Next, you need to tell `systemd` to reload its system-level
145 configuration files and enable the listening socket:
146
147 $ sudo systemctl daemon-reload
148 $ sudo systemctl enable fossil.socket
149
150 And now you can manipulate the socket listener:
151
--- www/server/index.html
+++ www/server/index.html
@@ -102,19 +102,19 @@
102102
HTTP requests from clients, you configure a socket listener daemon to
103103
run a <a href="/help?cmd=http"><tt>fossil http</tt></a> command on each
104104
HTTP hit. That Fossil instance handles only that one hit and then shuts
105105
back down, letting the socket listener go back to waiting for the next
106106
hit. This scheme is known to work with <a id="inetd"
107
-href="any/inetd.md">inetd</a>, <a id="xinetd"
108
-href="any/xinetd.md">xinetd</a>, and <a id="stunnel"
109
-href="any/stunnel.md">stunnel</a>.</p>
107
+href="any/inetd.md"><tt>inetd</tt></a>, <a id="xinetd"
108
+href="any/xinetd.md"><tt>xinetd</tt></a>, <a id="stunnel"
109
+href="any/stunnel.md"><tt>stunnel</tt></a>, and <a
110
+href="debian/service.md"><tt>systemd</tt></a>.</p>
110111
111112
<p>In principle, this method should also work with Apple’s
112
-<tt>launchd</tt>, Linux’s <tt>systemd</tt>, and Solaris’ SMF, all of
113
-which have similar socket listener features. We do not yet have
114
-tutorials showing how to configure these advanced daemons for Fossil,
115
-but we welcome <a href="contribute.wiki">contributions</a>.</p>
113
+<tt>launchd</tt> and Solaris’ SMF
114
+which have similar socket listener features. We
115
+we welcome <a href="contribute.wiki">contributions</a> of such tutorials.</p>
116116
117117
118118
<h3>SCGI</h3>
119119
120120
<p>The Fossil standalone server can also run <a href="any/scgi.md">in
@@ -159,11 +159,11 @@
159159
160160
<p>We've broken the configuration for each method out into a series of
161161
sub-articles. Some of these are generic, while others depend on
162162
particular operating systems or front-end software:</p>
163163
164
-<div id="tutpick"></div>
164
+<div id="tutpick" class="show"></div>
165165
166166
<!-- Define alternative to JS tutorial picker below. When updating this
167167
table, update "matrix" in the JS code below to match! -->
168168
<noscript id="tutmatrix">
169169
<table style="margin-left: 6em;">
@@ -281,11 +281,10 @@
281281
}
282282
html += '</select> <b>underneath</b> <select id="fep"></select>'
283283
html += '<a id="all">SHOW ALL</a></p>';
284284
const picker = document.querySelector('div#tutpick');
285285
picker.innerHTML = html;
286
- picker.classList.add('show');
287286
288287
// Slide noscript <table> in place of JS tutorial chooser on
289288
// "SHOW ALL" click.
290289
document.querySelector('a#all').addEventListener('click', () => {
291290
picker.classList.remove('show');
292291
--- www/server/index.html
+++ www/server/index.html
@@ -102,19 +102,19 @@
102 HTTP requests from clients, you configure a socket listener daemon to
103 run a <a href="/help?cmd=http"><tt>fossil http</tt></a> command on each
104 HTTP hit. That Fossil instance handles only that one hit and then shuts
105 back down, letting the socket listener go back to waiting for the next
106 hit. This scheme is known to work with <a id="inetd"
107 href="any/inetd.md">inetd</a>, <a id="xinetd"
108 href="any/xinetd.md">xinetd</a>, and <a id="stunnel"
109 href="any/stunnel.md">stunnel</a>.</p>
 
110
111 <p>In principle, this method should also work with Apple’s
112 <tt>launchd</tt>, Linux’s <tt>systemd</tt>, and Solaris’ SMF, all of
113 which have similar socket listener features. We do not yet have
114 tutorials showing how to configure these advanced daemons for Fossil,
115 but we welcome <a href="contribute.wiki">contributions</a>.</p>
116
117
118 <h3>SCGI</h3>
119
120 <p>The Fossil standalone server can also run <a href="any/scgi.md">in
@@ -159,11 +159,11 @@
159
160 <p>We've broken the configuration for each method out into a series of
161 sub-articles. Some of these are generic, while others depend on
162 particular operating systems or front-end software:</p>
163
164 <div id="tutpick"></div>
165
166 <!-- Define alternative to JS tutorial picker below. When updating this
167 table, update "matrix" in the JS code below to match! -->
168 <noscript id="tutmatrix">
169 <table style="margin-left: 6em;">
@@ -281,11 +281,10 @@
281 }
282 html += '</select> <b>underneath</b> <select id="fep"></select>'
283 html += '<a id="all">SHOW ALL</a></p>';
284 const picker = document.querySelector('div#tutpick');
285 picker.innerHTML = html;
286 picker.classList.add('show');
287
288 // Slide noscript <table> in place of JS tutorial chooser on
289 // "SHOW ALL" click.
290 document.querySelector('a#all').addEventListener('click', () => {
291 picker.classList.remove('show');
292
--- www/server/index.html
+++ www/server/index.html
@@ -102,19 +102,19 @@
102 HTTP requests from clients, you configure a socket listener daemon to
103 run a <a href="/help?cmd=http"><tt>fossil http</tt></a> command on each
104 HTTP hit. That Fossil instance handles only that one hit and then shuts
105 back down, letting the socket listener go back to waiting for the next
106 hit. This scheme is known to work with <a id="inetd"
107 href="any/inetd.md"><tt>inetd</tt></a>, <a id="xinetd"
108 href="any/xinetd.md"><tt>xinetd</tt></a>, <a id="stunnel"
109 href="any/stunnel.md"><tt>stunnel</tt></a>, and <a
110 href="debian/service.md"><tt>systemd</tt></a>.</p>
111
112 <p>In principle, this method should also work with Apple’s
113 <tt>launchd</tt> and Solaris’ SMF
114 which have similar socket listener features. We
115 we welcome <a href="contribute.wiki">contributions</a> of such tutorials.</p>
 
116
117
118 <h3>SCGI</h3>
119
120 <p>The Fossil standalone server can also run <a href="any/scgi.md">in
@@ -159,11 +159,11 @@
159
160 <p>We've broken the configuration for each method out into a series of
161 sub-articles. Some of these are generic, while others depend on
162 particular operating systems or front-end software:</p>
163
164 <div id="tutpick" class="show"></div>
165
166 <!-- Define alternative to JS tutorial picker below. When updating this
167 table, update "matrix" in the JS code below to match! -->
168 <noscript id="tutmatrix">
169 <table style="margin-left: 6em;">
@@ -281,11 +281,10 @@
281 }
282 html += '</select> <b>underneath</b> <select id="fep"></select>'
283 html += '<a id="all">SHOW ALL</a></p>';
284 const picker = document.querySelector('div#tutpick');
285 picker.innerHTML = html;
 
286
287 // Slide noscript <table> in place of JS tutorial chooser on
288 // "SHOW ALL" click.
289 document.querySelector('a#all').addEventListener('click', () => {
290 picker.classList.remove('show');
291

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button