Fossil SCM
Assorted small tweaks to server docs, mainly around new systemd material.
Commit
9d4a478241c5511451d5be0678d2d171430649764825f9bed0ee014f8fc5dd44
Parent
94763aed7c2a947…
2 files changed
+8
-10
+8
-9
+8
-10
| --- www/server/debian/service.md | ||
| +++ www/server/debian/service.md | ||
| @@ -78,11 +78,11 @@ | ||
| 78 | 78 | |
| 79 | 79 | |
| 80 | 80 | ## Socket Activation |
| 81 | 81 | |
| 82 | 82 | 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].” | |
| 84 | 84 | It’s more complicated, but it has some nice properties. It is the |
| 85 | 85 | feature that allows `systemd` to replace `inetd`, `xinetd`, Upstart, and |
| 86 | 86 | several other competing technologies. |
| 87 | 87 | |
| 88 | 88 | We first need to define the privileged socket listener by writing |
| @@ -126,27 +126,25 @@ | ||
| 126 | 126 | [Install] |
| 127 | 127 | WantedBy=sockets.target |
| 128 | 128 | WantedBy=multi-user.target |
| 129 | 129 | ``` |
| 130 | 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. | |
| 131 | +We’ll explain the “`@`” in the file name below. | |
| 134 | 132 | |
| 135 | 133 | Notice that we haven’t told `systemd` which user and group to run Fossil |
| 136 | 134 | under. Since this is a system-level service definition, that means it |
| 137 | 135 | will run as root, which then causes Fossil to [automatically drop into a |
| 138 | 136 | `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. | |
| 140 | 138 | |
| 141 | 139 | 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. | |
| 145 | 143 | |
| 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: | |
| 148 | 146 | |
| 149 | 147 | $ sudo systemctl daemon-reload |
| 150 | 148 | $ sudo systemctl enable fossil.socket |
| 151 | 149 | |
| 152 | 150 | And now you can manipulate the socket listener: |
| 153 | 151 |
| --- 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 |
+8
-9
| --- www/server/index.html | ||
| +++ www/server/index.html | ||
| @@ -102,19 +102,19 @@ | ||
| 102 | 102 | HTTP requests from clients, you configure a socket listener daemon to |
| 103 | 103 | run a <a href="/help?cmd=http"><tt>fossil http</tt></a> command on each |
| 104 | 104 | HTTP hit. That Fossil instance handles only that one hit and then shuts |
| 105 | 105 | back down, letting the socket listener go back to waiting for the next |
| 106 | 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> | |
| 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> | |
| 110 | 111 | |
| 111 | 112 | <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> | |
| 116 | 116 | |
| 117 | 117 | |
| 118 | 118 | <h3>SCGI</h3> |
| 119 | 119 | |
| 120 | 120 | <p>The Fossil standalone server can also run <a href="any/scgi.md">in |
| @@ -159,11 +159,11 @@ | ||
| 159 | 159 | |
| 160 | 160 | <p>We've broken the configuration for each method out into a series of |
| 161 | 161 | sub-articles. Some of these are generic, while others depend on |
| 162 | 162 | particular operating systems or front-end software:</p> |
| 163 | 163 | |
| 164 | -<div id="tutpick"></div> | |
| 164 | +<div id="tutpick" class="show"></div> | |
| 165 | 165 | |
| 166 | 166 | <!-- Define alternative to JS tutorial picker below. When updating this |
| 167 | 167 | table, update "matrix" in the JS code below to match! --> |
| 168 | 168 | <noscript id="tutmatrix"> |
| 169 | 169 | <table style="margin-left: 6em;"> |
| @@ -281,11 +281,10 @@ | ||
| 281 | 281 | } |
| 282 | 282 | html += '</select> <b>underneath</b> <select id="fep"></select>' |
| 283 | 283 | html += '<a id="all">SHOW ALL</a></p>'; |
| 284 | 284 | const picker = document.querySelector('div#tutpick'); |
| 285 | 285 | picker.innerHTML = html; |
| 286 | - picker.classList.add('show'); | |
| 287 | 286 | |
| 288 | 287 | // Slide noscript <table> in place of JS tutorial chooser on |
| 289 | 288 | // "SHOW ALL" click. |
| 290 | 289 | document.querySelector('a#all').addEventListener('click', () => { |
| 291 | 290 | picker.classList.remove('show'); |
| 292 | 291 |
| --- 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 |