diff options
| author | 2024-04-24 10:03:39 +0100 | |
|---|---|---|
| committer | 2024-04-24 10:03:39 +0100 | |
| commit | 27b139b03c23e3d0b86bcf27a1a2603fb50c9439 (patch) | |
| tree | 3e8915c5df74b805d9e0412c4d60a01a3dc66e05 | |
| parent | 36b34690d47c91e7e2484d70f83d83a5657b886b (diff) | |
| download | sentrum-27b139b03c23e3d0b86bcf27a1a2603fb50c9439.tar.gz sentrum-27b139b03c23e3d0b86bcf27a1a2603fb50c9439.tar.bz2 sentrum-27b139b03c23e3d0b86bcf27a1a2603fb50c9439.zip | |
Rewrite systemd instructions
| -rw-r--r-- | README.md | 31 | 
1 files changed, 18 insertions, 13 deletions
| @@ -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: | 
