summaryrefslogtreecommitdiff
path: root/nonsystemd/mdadm-openrc/mdadm.initd
diff options
context:
space:
mode:
Diffstat (limited to 'nonsystemd/mdadm-openrc/mdadm.initd')
-rw-r--r--nonsystemd/mdadm-openrc/mdadm.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/nonsystemd/mdadm-openrc/mdadm.initd b/nonsystemd/mdadm-openrc/mdadm.initd
new file mode 100644
index 000000000..93325dd6c
--- /dev/null
+++ b/nonsystemd/mdadm-openrc/mdadm.initd
@@ -0,0 +1,25 @@
+#!/usr/bin/openrc-run
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ use logger dns net
+}
+
+start() {
+ ebegin "Starting mdadm monitor"
+ mdadm --monitor --scan \
+ --daemonise \
+ --pid-file /run/mdadm.pid \
+ ${MDADM_OPTS}
+ eend $?
+}
+
+stop() {
+ local ret
+ ebegin "Stopping mdadm monitor"
+ start-stop-daemon --stop --pidfile /run/mdadm.pid
+ ret=$?
+ rm -f /run/mdadm.pid
+ eend ${ret}
+}