Rationalise docs part 4 #151

This commit is contained in:
Ian Renton
2026-09-23 18:25:05 +01:00
parent 2d14342089
commit 5db79ec85a
24 changed files with 604 additions and 518 deletions
+31
View File
@@ -0,0 +1,31 @@
{% extends "../help_page.html" %}
{% block help_content %}
<h2 class="mt-4 mb-4">systemd configuration</h2>
<p>If you want Spothole to run automatically on startup on a Linux distribution that uses <code>systemd</code>, follow the
instructions here. For distros that don't use <code>systemd</code>, or Windows/OSX/etc., you can find generic instructions for your
OS online.</p>
<p>Create a file at <code>/etc/systemd/system/spothole.service</code>. Give it the following content, adjusting for the user you want
to run it as and the directory in which you have installed it:</p>
<pre><code>[Unit]
Description=Spothole
After=syslog.target network.target
[Service]
Type=simple
User=spothole
WorkingDirectory=/home/spothole/spothole
ExecStart=/home/spothole/spothole/.venv/bin/python /home/spothole/spothole/spothole.py --serve-in-foreground
Restart=on-abort
[Install]
WantedBy=multi-user.target
</code></pre>
<p>Run the following:</p>
<pre><code>sudo systemctl daemon-reload
sudo systemctl enable spothole
sudo systemctl start spothole
</code></pre>
<p>Check the service has started up correctly with <code>sudo journalctl -u spothole -f</code>.</p>
{% end %}