summaryrefslogtreecommitdiffstatshomepage
path: root/README.md
diff options
context:
space:
mode:
authorLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2024-04-24 10:03:39 +0100
committerLibravatar sommerfeld <sommerfeld@sommerfeld.dev>2024-04-24 10:03:39 +0100
commit27b139b03c23e3d0b86bcf27a1a2603fb50c9439 (patch)
tree3e8915c5df74b805d9e0412c4d60a01a3dc66e05 /README.md
parent36b34690d47c91e7e2484d70f83d83a5657b886b (diff)
downloadsentrum-27b139b03c23e3d0b86bcf27a1a2603fb50c9439.tar.gz
sentrum-27b139b03c23e3d0b86bcf27a1a2603fb50c9439.tar.bz2
sentrum-27b139b03c23e3d0b86bcf27a1a2603fb50c9439.zip
Rewrite systemd instructions
Diffstat (limited to 'README.md')
-rw-r--r--README.md31
1 files changed, 18 insertions, 13 deletions
diff --git a/README.md b/README.md
index 14abe54..24f7b18 100644
--- a/README.md
+++ b/README.md
@@ -310,30 +310,35 @@ spam your notification channels for every transaction.
The ideal use-case is as a long running daemon, so it makes sense to configure
it as a systemd service.
-If you are installing `sentrum` manually (e.g. from the releases page), you
-should:
+If you installed sentrum from the AUR, you just need to edit
+`/etc/sentrum/sentrum.conf` and do `sudo systemclt enable --now sentrum.service`
-1. Create a new `sentrum` user:
+If you are installing `sentrum` manually (e.g. from the releases page or `cargo
+install`), you should (either from the cloned repository or from inside the
+extracted release archive):
+
+1. Copy systemd files to appropriate places:
```bash
-sudo useradd -d /var/lib/sentrum -m sentrum
+sudo cp contrib/systemd/sentrum.service
+sudo cp contrib/systemd/sentrum.sysusers /etc/sysusers.d/sentrum.conf
+sudo cp contrib/systemd/sentrum.tmpfiles /etc/tmpfiles.d/sentrum.conf
```
-2. Place the `sentrum.toml` configuration file in `/etc/sentrum`:
+2. Reload systemd daemon, sysusers and tmpfiles:
```bash
-sudo mkdir -p /etc/sentrum
-sudo cp sentrum.toml /etc/sentrum
-sudo chown -R sentrum:sentrum /etc/sentrum
+sudo systemclt daemon-reload
+sudo systemd-sysusers
+sudo systemd-tmpfiles --create
```
-3. Copy the [contrib/sentrum.service](contrib/sentrum.service) into the
- `/etc/systemd/system`
-
-3. Reload systemd so that the service file can be found:
+3. Place the `sentrum.toml` (or `sentrum.sample.toml`) configuration file in
+`/etc/sentrum` and make sure the `sentrum` user owns it:
```bash
-sudo systemclt daemon-reload
+sudo cp sentrum.toml /etc/sentrum
+sudo chown sentrum:sentrum /etc/sentrum/sentrum.toml
```
4. Enable and start the service: