From e33ee41cad80421cfa03685d889da94ec65179e4 Mon Sep 17 00:00:00 2001 From: lilly-lizard Date: Wed, 21 Jun 2023 22:28:57 +1200 Subject: readme: openrc service instructions --- README.md | 34 ++++++++++++++++++++++++++++++++-- 1 file 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 remap ``` -Replace `` with the path to your evremap executable and `` with the path -to your configuration file +Replace `` with the path to your evremap executable and `` 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="" +command_args="remap " +``` + +Replace `` with the path to your evremap executable and `` 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? -- cgit v1.2.3