Skip to content

Commit e33ee41

Browse files
lilly-lizardwez
authored andcommitted
readme: openrc service instructions
1 parent 5523e9a commit e33ee41

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.md

+32-2
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,44 @@ set -e
156156
exec <PATH_TO_EVREMAP> remap <CONFIG>
157157
```
158158

159-
Replace `<PATH_TO_EVREMAP>` with the path to your evremap executable and `<CONFIG>` with the path
160-
to your configuration file
159+
Replace `<PATH_TO_EVREMAP>` with the path to your evremap executable and `<CONFIG>` with the path to your configuration file.
161160

162161
* Finally, symlink the evremap directory to `/var/service`
163162
```console
164163
sudo ln -s /etc/sv/evremap /var/service
165164
```
166165

166+
## OpenRC
167+
168+
To make an OpenRC service, create the file `/etc/init.d/evremap` with the following contents...
169+
170+
```console
171+
#!/usr/bin/openrc-run
172+
173+
supervisor=supervise-daemon
174+
command="<PATH_TO_EVREMAP>"
175+
command_args="remap <CONFIG>"
176+
```
177+
178+
Replace `<PATH_TO_EVREMAP>` with the path to your evremap executable and `<CONFIG>` with the path to your configuration file.
179+
180+
Make the file executable...
181+
182+
```console
183+
chmod +x /etc/init.d/evremap
184+
```
185+
186+
Enable the service with...
187+
188+
```console
189+
rc-update add evremap
190+
```
191+
192+
Start the service with...
193+
194+
```console
195+
rc-service evremap start
196+
```
167197

168198
## How do I make this execute a command when a key is pressed?
169199

0 commit comments

Comments
 (0)