mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-08-08 19:41:41 +00:00
Split up docs. Closes #122
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
## systemd configuration
|
||||
|
||||
If you want Spothole to run automatically on startup on a Linux distribution that uses `systemd`, follow the
|
||||
instructions here. For distros that don't use `systemd`, or Windows/OSX/etc., you can find generic instructions for your
|
||||
OS online.
|
||||
|
||||
Create a file at `/etc/systemd/system/spothole.service`. Give it the following content, adjusting for the user you want
|
||||
to run it as and the directory in which you have installed it:
|
||||
|
||||
```
|
||||
[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
|
||||
```
|
||||
|
||||
Run the following:
|
||||
|
||||
```bash
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable spothole
|
||||
sudo systemctl start spothole
|
||||
```
|
||||
|
||||
Check the service has started up correctly with `sudo journalctl -u spothole -f`.
|
||||
Reference in New Issue
Block a user