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 $? +}