| 1 |
#!/sbin/runscript
|
| 2 |
# Copyright 1999-2012 Gentoo Foundation
|
| 3 |
# Distributed under the terms of the GNU General Public License v2
|
| 4 |
# $Header: /var/cvsroot/gentoo-x86/sys-apps/rsbac-admin/files/rklogd,v 1.2 2012/05/15 18:39:25 blueness Exp $
|
| 5 |
|
| 6 |
daemon="rklogd"
|
| 7 |
rsbac_info="/proc/rsbac-info"
|
| 8 |
|
| 9 |
start() {
|
| 10 |
ebegin "Starting rklogd"
|
| 11 |
|
| 12 |
local ret
|
| 13 |
if [ -d "${rsbac_info}" ]; then
|
| 14 |
if type run-jail >/dev/null 2>&1; then
|
| 15 |
$(which run-jail) $daemon start-stop-daemon --start --exec $(which ${daemon})
|
| 16 |
else
|
| 17 |
start-stop-daemon --start --exec $(which ${daemon})
|
| 18 |
fi
|
| 19 |
ret=$?
|
| 20 |
else
|
| 21 |
ewarn "No rsbac-info directory avaible."
|
| 22 |
ret=1
|
| 23 |
fi
|
| 24 |
|
| 25 |
eend $ret
|
| 26 |
}
|
| 27 |
|
| 28 |
stop() {
|
| 29 |
ebegin "Stopping rklogd"
|
| 30 |
start-stop-daemon --stop --exec $(which ${daemon})
|
| 31 |
eend $?
|
| 32 |
}
|