summaryrefslogtreecommitdiff
blob: 8fa4b91c0fdc04e3e5ef68e4bdad4502bd8018b0 (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-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

NAME=earlyoom
EARLYOOM_EXEC=/usr/bin/$NAME
EARLYOOM_ARGS="-k"
LOGFILE=/var/log/$NAME.log
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME

depend() {
	need localmount
}

start() {
	ebegin "Starting earlyoom"
	start-stop-daemon --start --quiet --background --exec $EARLYOOM_EXEC -- $EARLYOOM_ARGS
	eend $?
}

stop() {
	ebegin "Stopping earlyoom"
	start-stop-daemon --stop --quiet --exec $EARLYOOM_EXEC
	eend $?
}