Fossil SCM

Updated the systemd service article to account for my experience following the instructions on a CentOS 8 box. (It was originally written for an older Debian type platform.)

wyoung 2021-07-15 20:25 trunk
Commit 74670ab1fff5e2fcb9bbbb3a141b7b9baf2bef5e6a5ce69b2f03bc8a73f9add6
1 file changed +14 -9
--- www/server/debian/service.md
+++ www/server/debian/service.md
@@ -29,20 +29,19 @@
2929
`~/.local/share/systemd/user/fossil.service`:
3030
3131
```dosini
3232
[Unit]
3333
Description=Fossil user server
34
- After=network.target
34
+ After=network-online.target
3535
3636
[Service]
3737
WorkingDirectory=/home/fossil/museum
3838
ExecStart=/home/fossil/bin/fossil server --port 9000 repo.fossil
3939
Restart=always
4040
RestartSec=3
4141
4242
[Install]
43
- WantedBy=sockets.target
4443
WantedBy=multi-user.target
4544
```
4645
4746
Unlike with `inetd` and `xinetd`, we don’t need to tell `systemd` which
4847
user and group to run this service as, because we’ve installed it
@@ -64,11 +63,11 @@
6463
find online:
6564
6665
$ systemctl --user daemon-reload
6766
$ systemctl --user enable fossil
6867
$ systemctl --user start fossil
69
- $ systemctl --user status -l fossil
68
+ $ systemctl --user status fossil -l
7069
$ systemctl --user stop fossil
7170
7271
That is, we don’t need to talk to `systemd` with `sudo` privileges, but
7372
we do need to tell it to look at the user configuration rather than the
7473
system-level configuration.
@@ -89,14 +88,21 @@
8988
9089
9190
9291
### System Service Alternative
9392
94
-Another workaround for the problem with user services above is to
95
-install the service as a system service instead. This is a better path
96
-when you are proxying Fossil with a system-level service, such as
97
-[nginx](./nginx.md).
93
+There are a couple of common reasons that you’d have cause to install
94
+Fossil as a system-level service rather than the prior user-level one:
95
+
96
+* You need Fossil to listen on a TCP port under 1024, such as because
97
+ you’re running it on a private LAN, and the server has no other HTTP
98
+ service, so you want Fossil to handle the web traffic directly.
99
+
100
+* You’re proxying Fossil with a system-level service such as
101
+ [nginx](./nginx.md), so you need to put Fossil into the system-level
102
+ service dependency chain to make sure things start up and shut down
103
+ in the proper order.
98104
99105
There are just a small set of changes required:
100106
101107
1. Install the unit file to one of the persistent system-level unit
102108
file directories. Typically, these are:
@@ -146,19 +152,18 @@
146152
`[email protected]`:
147153
148154
```dosini
149155
[Unit]
150156
Description=Fossil socket server
151
- After=network.target
157
+ After=network-online.target
152158
153159
[Service]
154160
WorkingDirectory=/home/fossil/museum
155161
ExecStart=/home/fossil/bin/fossil http repo.fossil
156162
StandardInput=socket
157163
158164
[Install]
159
- WantedBy=sockets.target
160165
WantedBy=multi-user.target
161166
```
162167
163168
We’ll explain the “`@`” in the file name below.
164169
165170
--- www/server/debian/service.md
+++ www/server/debian/service.md
@@ -29,20 +29,19 @@
29 `~/.local/share/systemd/user/fossil.service`:
30
31 ```dosini
32 [Unit]
33 Description=Fossil user server
34 After=network.target
35
36 [Service]
37 WorkingDirectory=/home/fossil/museum
38 ExecStart=/home/fossil/bin/fossil server --port 9000 repo.fossil
39 Restart=always
40 RestartSec=3
41
42 [Install]
43 WantedBy=sockets.target
44 WantedBy=multi-user.target
45 ```
46
47 Unlike with `inetd` and `xinetd`, we don’t need to tell `systemd` which
48 user and group to run this service as, because we’ve installed it
@@ -64,11 +63,11 @@
64 find online:
65
66 $ systemctl --user daemon-reload
67 $ systemctl --user enable fossil
68 $ systemctl --user start fossil
69 $ systemctl --user status -l fossil
70 $ systemctl --user stop fossil
71
72 That is, we don’t need to talk to `systemd` with `sudo` privileges, but
73 we do need to tell it to look at the user configuration rather than the
74 system-level configuration.
@@ -89,14 +88,21 @@
89
90
91
92 ### System Service Alternative
93
94 Another workaround for the problem with user services above is to
95 install the service as a system service instead. This is a better path
96 when you are proxying Fossil with a system-level service, such as
97 [nginx](./nginx.md).
 
 
 
 
 
 
 
98
99 There are just a small set of changes required:
100
101 1. Install the unit file to one of the persistent system-level unit
102 file directories. Typically, these are:
@@ -146,19 +152,18 @@
146 `[email protected]`:
147
148 ```dosini
149 [Unit]
150 Description=Fossil socket server
151 After=network.target
152
153 [Service]
154 WorkingDirectory=/home/fossil/museum
155 ExecStart=/home/fossil/bin/fossil http repo.fossil
156 StandardInput=socket
157
158 [Install]
159 WantedBy=sockets.target
160 WantedBy=multi-user.target
161 ```
162
163 We’ll explain the “`@`” in the file name below.
164
165
--- www/server/debian/service.md
+++ www/server/debian/service.md
@@ -29,20 +29,19 @@
29 `~/.local/share/systemd/user/fossil.service`:
30
31 ```dosini
32 [Unit]
33 Description=Fossil user server
34 After=network-online.target
35
36 [Service]
37 WorkingDirectory=/home/fossil/museum
38 ExecStart=/home/fossil/bin/fossil server --port 9000 repo.fossil
39 Restart=always
40 RestartSec=3
41
42 [Install]
 
43 WantedBy=multi-user.target
44 ```
45
46 Unlike with `inetd` and `xinetd`, we don’t need to tell `systemd` which
47 user and group to run this service as, because we’ve installed it
@@ -64,11 +63,11 @@
63 find online:
64
65 $ systemctl --user daemon-reload
66 $ systemctl --user enable fossil
67 $ systemctl --user start fossil
68 $ systemctl --user status fossil -l
69 $ systemctl --user stop fossil
70
71 That is, we don’t need to talk to `systemd` with `sudo` privileges, but
72 we do need to tell it to look at the user configuration rather than the
73 system-level configuration.
@@ -89,14 +88,21 @@
88
89
90
91 ### System Service Alternative
92
93 There are a couple of common reasons that you’d have cause to install
94 Fossil as a system-level service rather than the prior user-level one:
95
96 * You need Fossil to listen on a TCP port under 1024, such as because
97 you’re running it on a private LAN, and the server has no other HTTP
98 service, so you want Fossil to handle the web traffic directly.
99
100 * You’re proxying Fossil with a system-level service such as
101 [nginx](./nginx.md), so you need to put Fossil into the system-level
102 service dependency chain to make sure things start up and shut down
103 in the proper order.
104
105 There are just a small set of changes required:
106
107 1. Install the unit file to one of the persistent system-level unit
108 file directories. Typically, these are:
@@ -146,19 +152,18 @@
152 `[email protected]`:
153
154 ```dosini
155 [Unit]
156 Description=Fossil socket server
157 After=network-online.target
158
159 [Service]
160 WorkingDirectory=/home/fossil/museum
161 ExecStart=/home/fossil/bin/fossil http repo.fossil
162 StandardInput=socket
163
164 [Install]
 
165 WantedBy=multi-user.target
166 ```
167
168 We’ll explain the “`@`” in the file name below.
169
170

Keyboard Shortcuts

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