diff --git a/README.md b/README.md index 432af7f..ed20e69 100644 --- a/README.md +++ b/README.md @@ -117,8 +117,9 @@ it on system boot. #### Systemd An example systemd unit file for Molly Brown, named -`molly-brown.service.example`, can be found in the source directory. -After copying this file to `/etc/systemd/system/molly-brown.service` +`molly-brown.service.example`, can be found in the `contrib/init` +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 system's documentation for the appropriate choice) and making any necessary changes for your environment, you can run the follow @@ -133,7 +134,11 @@ automatically on system boot. #### 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 diff --git a/contrib/init/molly-brown.openrc.example b/contrib/init/molly-brown.openrc.example new file mode 100644 index 0000000..472baf0 --- /dev/null +++ b/contrib/init/molly-brown.openrc.example @@ -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 +} diff --git a/molly-brown.service.example b/contrib/init/molly-brown.service.example similarity index 100% rename from molly-brown.service.example rename to contrib/init/molly-brown.service.example