summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornathan dawit <nathandawit555@gmail.com>2023-06-14 13:24:24 +0300
committerWez Furlong <wez@wezfurlong.org>2023-06-14 06:47:20 -0700
commit4480c4eda223b98899b0fbd926bc34f7bd0e1a18 (patch)
tree12a97d7eb5f57ecd7d7becb41f6030349efd7951
parent34709e6b67fc7f957349f4b6eb7487b52ca9e44f (diff)
Add instructions for Runit in README.md
-rw-r--r--README.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
index 7812d0d..02b87e1 100644
--- a/README.md
+++ b/README.md
@@ -139,6 +139,32 @@ $ sudo systemctl enable evremap.service
$ sudo systemctl start evremap.service
```
+## Runit
+
+If you're using Runit instead of Systemd, follow these steps to create a service.
+
+* Create a directory called `evremap` and create a file called `run` under it
+```console
+sudo mkdir /etc/sv/evremap
+sudo touch /etc/sv/evremap/run
+```
+
+* Copy these lines into the run file
+```console
+#!/bin/sh
+set -e
+exec <PATH_TO_EVREMAP> remap <CONFIG>
+```
+
+Replace `<PATH_TO_EVREMAP>` with the path to your evremap executable and `<CONFIG>` with the path
+to your configuration file
+
+* Finally, symlink the evremap directory to `/var/service`
+```console
+sudo ln -s /etc/sv/evremap /var/service
+```
+
+
## How do I make this execute a command when a key is pressed?
That feature is not implemented.