Browse Source

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 <sam@gentoo.org>
tags/v2.9.1
Sam James 2 years ago
parent
commit
2619a23458
2 changed files with 21 additions and 0 deletions
  1. 2
    0
      distrib/openrc/ergo.confd
  2. 19
    0
      distrib/openrc/ergo.initd

+ 2
- 0
distrib/openrc/ergo.confd View File

@@ -0,0 +1,2 @@
1
+# /etc/conf.d/ergo: config file for /etc/init.d/ergo
2
+ERGO_CONFIGFILE="/etc/ergo/ircd.yaml"

+ 19
- 0
distrib/openrc/ergo.initd View File

@@ -0,0 +1,19 @@
1
+#!/sbin/openrc-run
2
+command=/usr/bin/ergo
3
+command_args="run --conf ${ERGO_CONFIGFILE:-"/etc/ergo/ircd.yaml"}"
4
+command_background=true
5
+extra_started_commands="reload"
6
+pidfile=/var/run/ergo.pid
7
+name="ergo"
8
+description="ergo IRC daemon"
9
+
10
+depend() {
11
+	use dns
12
+	provide ircd
13
+}
14
+
15
+reload() {
16
+	ebegin "Reloading ${RC_SVCNAME}"
17
+	start-stop-daemon --signal HUP --pidfile "${pidfile}"
18
+	eend $?
19
+}

Loading…
Cancel
Save