summaryrefslogtreecommitdiff
blob: 6c1b80167490a3c29d49d4886e474072d60c72af (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
#!/sbin/openrc-run
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

description='Start/stop mcelog in daemon mode'

PIDFILE="/var/run/mcelog.pid"

depend() {
	after udev 
	need localmount
	use logging
}

start() {
	ebegin "Starting mcelog"
	start-stop-daemon \
		--start \
		--pidfile ${PIDFILE} \
		--exec /usr/sbin/mcelog -- --daemon --pidfile ${PIDFILE} ${MCELOG_OPTS} 
        eend $?
}

stop() {
	ebegin "Stopping mcelog"
	start-stop-daemon --stop --pidfile ${PIDFILE}
	eend $?
}