summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlilly-lizard <bigbanana29@aol.com>2023-06-21 22:28:57 +1200
committerWez Furlong <wez@wezfurlong.org>2023-07-10 08:11:53 -0700
commite33ee41cad80421cfa03685d889da94ec65179e4 (patch)
tree443f6f967441dd332e436cad6d6a2b372cd58482
parent5523e9af89d11f3444bd588ae9a1e5d20340e63b (diff)
readme: openrc service instructions
-rw-r--r--README.md34
1 files changed, 32 insertions, 2 deletions
diff --git a/README.md b/README.md
index 02b87e1..60f4ec7 100644
--- a/README.md
+++ b/README.md
@@ -156,14 +156,44 @@ 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
+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
```
+## OpenRC
+
+To make an OpenRC service, create the file `/etc/init.d/evremap` with the following contents...
+
+```console
+#!/usr/bin/openrc-run
+
+supervisor=supervise-daemon
+command="<PATH_TO_EVREMAP>"
+command_args="remap <CONFIG>"
+```
+
+Replace `<PATH_TO_EVREMAP>` with the path to your evremap executable and `<CONFIG>` with the path to your configuration file.
+
+Make the file executable...
+
+```console
+chmod +x /etc/init.d/evremap
+```
+
+Enable the service with...
+
+```console
+rc-update add evremap
+```
+
+Start the service with...
+
+```console
+rc-service evremap start
+```
## How do I make this execute a command when a key is pressed?