summaryrefslogtreecommitdiff
path: root/user/mdadm/mdadm.initd
diff options
context:
space:
mode:
Diffstat (limited to 'user/mdadm/mdadm.initd')
-rw-r--r--user/mdadm/mdadm.initd28
1 files changed, 28 insertions, 0 deletions
diff --git a/user/mdadm/mdadm.initd b/user/mdadm/mdadm.initd
new file mode 100644
index 000000000..f799dd4d5
--- /dev/null
+++ b/user/mdadm/mdadm.initd
@@ -0,0 +1,28 @@
+#!/sbin/openrc-run
+
+# Sample init.d file for alpine linux.
+
+NAME=mdadm
+DAEMON=/sbin/$NAME
+
+depend() {
+ use logger dns net
+ after firewall
+}
+
+start() {
+ ebegin "Starting ${NAME}"
+ start-stop-daemon --start --quiet --background \
+ --exec ${DAEMON} -- \
+ --monitor --scan \
+ --daemonise ${OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${NAME}"
+ start-stop-daemon --stop --quiet \
+ --exec ${DAEMON}
+ eend $?
+}
+