From 2619a23458aea6bbf13c317bb8ffdd0df04d9d01 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 9 Jan 2022 07:36:02 +0000 Subject: [PATCH 1/2] distrib: add OpenRC init scripts Written originally for Gentoo but should work on Alpine and other OpenRC-consuming distros too. Signed-off-by: Sam James --- distrib/openrc/ergo.confd | 2 ++ distrib/openrc/ergo.initd | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 distrib/openrc/ergo.confd create mode 100644 distrib/openrc/ergo.initd diff --git a/distrib/openrc/ergo.confd b/distrib/openrc/ergo.confd new file mode 100644 index 00000000..4a061b86 --- /dev/null +++ b/distrib/openrc/ergo.confd @@ -0,0 +1,2 @@ +# /etc/conf.d/ergo: config file for /etc/init.d/ergo +ERGO_CONFIGFILE="/etc/ergo/ircd.yaml" diff --git a/distrib/openrc/ergo.initd b/distrib/openrc/ergo.initd new file mode 100644 index 00000000..025d6951 --- /dev/null +++ b/distrib/openrc/ergo.initd @@ -0,0 +1,19 @@ +#!/sbin/openrc-run +command=/usr/bin/ergo +command_args="run --conf ${ERGO_CONFIGFILE:-"/etc/ergo/ircd.yaml"}" +command_background=true +extra_started_commands="reload" +pidfile=/var/run/ergo.pid +name="ergo" +description="ergo IRC daemon" + +depend() { + use dns + provide ircd +} + +reload() { + ebegin "Reloading ${RC_SVCNAME}" + start-stop-daemon --signal HUP --pidfile "${pidfile}" + eend $? +} From e6951aca3fc88a81e12f62232ca4fc02d92b2bdf Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 9 Jan 2022 07:37:34 +0000 Subject: [PATCH 2/2] README: add Gentoo package Signed-off-by: Sam James --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 346d7875..26783646 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,7 @@ ergo run # server should be ready to go! Some platforms/distros also have Ergo packages maintained for them: * Arch Linux [AUR](https://aur.archlinux.org/packages/ergochat/) - Maintained by [Jason Papakostas (@vith)](https://github.com/vith). +* [Gentoo Linux](https://packages.gentoo.org/packages/net-irc/ergo) - Maintained by [Sam James (@thesamesam)](https://github.com/thesamesam). ### Using Docker