Add example OpenRC script, and put all init examples in a contrib directory.

This commit is contained in:
Solderpunk 2020-07-01 17:00:18 +02:00
parent 2a263e5e70
commit 54f659c03f
3 changed files with 20 additions and 3 deletions

View File

@ -117,8 +117,9 @@ it on system boot.
#### Systemd #### Systemd
An example systemd unit file for Molly Brown, named An example systemd unit file for Molly Brown, named
`molly-brown.service.example`, can be found in the source directory. `molly-brown.service.example`, can be found in the `contrib/init`
After copying this file to `/etc/systemd/system/molly-brown.service` directory of the Molly Brown source directory. After copying this
file to `/etc/systemd/system/molly-brown.service`
or `/usr/lib/systemd/system/molly-brown.service` (consult your or `/usr/lib/systemd/system/molly-brown.service` (consult your
system's documentation for the appropriate choice) and making any system's documentation for the appropriate choice) and making any
necessary changes for your environment, you can run the follow necessary changes for your environment, you can run the follow
@ -133,7 +134,11 @@ automatically on system boot.
#### OpenRC #### OpenRC
Instructions coming soon. An example OpenRC initscript for Molly Brown, named
`molly-brown.openrc.example`, can be found in the `contrib/init`
directory of the Molly Brown source directory.
More detailed instructions on OpenRC setup are welcome!
## Configuration Options ## Configuration Options

View File

@ -0,0 +1,12 @@
#!/sbin/openrc-run
command="/usr/sbin/molly-brown"
command_user="gemini"
command_background="yes"
pidfile="/run/$RC_SVCNAME/$RC_SVCNAME.pid"
start_pre() {
checkpath --directory --owner $command_user:$command_user --mode 0775 \
/run/$RC_SVCNAME /var/log/molly
}