summaryrefslogtreecommitdiff
blob: 9dd2a6270d4971f99ac3872873e5ab0cfd7314eb (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
29
30
31
32
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

daemon="rklogd"
rsbac_info="/proc/rsbac-info"

start() {
	ebegin "Starting rklogd"

	local ret
	if [ -d "${rsbac_info}" ]; then
		if type run-jail >/dev/null 2>&1; then
			$(which run-jail) $daemon start-stop-daemon --start --exec $(which ${daemon})
		else
			start-stop-daemon --start --exec $(which ${daemon})
		fi
		ret=$?
	else
		ewarn "No rsbac-info directory avaible."
		ret=1 
	fi

	eend $ret
}

stop() {
	ebegin "Stopping rklogd"
	start-stop-daemon --stop --exec $(which ${daemon})
	eend $?
}