summaryrefslogtreecommitdiff
blob: 4e0b33c761467ab99d5b42724168368fbd5438aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
From d942cda4543a68d0b93150fe80428f0b6d72d536 Mon Sep 17 00:00:00 2001
From: "Robin H. Johnson" <robbat2@gentoo.org>
Date: Sun, 13 May 2007 20:18:36 +1200
Subject: Add init script and configuration

---
 gentoo/conf.d/perlbal |  4 ++++
 gentoo/init.d/perlbal | 24 ++++++++++++++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 gentoo/conf.d/perlbal
 create mode 100755 gentoo/init.d/perlbal

diff --git a/gentoo/conf.d/perlbal b/gentoo/conf.d/perlbal
new file mode 100644
index 0000000..1ddb6e1
--- /dev/null
+++ b/gentoo/conf.d/perlbal
@@ -0,0 +1,4 @@
+# PIDFILE is not yet used, pending upstream still
+#PIDFILE="/var/run/perlbal.pid"
+PERLBAL_OPTS="--daemon --config=/etc/perlbal/perlbal.conf"
+# vim: ft=gentoo-conf-d:
diff --git a/gentoo/init.d/perlbal b/gentoo/init.d/perlbal
new file mode 100755
index 0000000..a3db214
--- /dev/null
+++ b/gentoo/init.d/perlbal
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+
+NAME="perlbal"
+BINARY="/usr/bin/perlbal"
+
+depend() {
+	use net
+}
+
+start() {
+	ebegin "Starting $NAME"
+	# Add --pidfile when upstream supports PIDFILES
+	start-stop-daemon --start \
+		--exec ${BINARY} -- ${PERLBAL_OPTS}
+	eend $?
+}
+
+stop() {
+	ebegin "Stopping $NAME"
+	start-stop-daemon --stop --exec "${BINARY}"
+	eend $?
+}
+
+# vim: ft=gentoo-init-d:
-- 
2.15.1