summaryrefslogtreecommitdiff
blob: c5bd38b13a147f78266b7a5ff09d9dc81ea60a61 (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
#!/sbin/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 /var/run/mdadm.pid \
		${MDADM_OPTS}
	eend $?
}

stop() {
	local ret
	ebegin "Stopping mdadm monitor"
	start-stop-daemon --stop --pidfile /var/run/mdadm.pid
	ret=$?
	rm -f /var/run/mdadm.pid
	eend ${ret}
}