diff options
Diffstat (limited to 'sys-apps/rsbac-admin/files/rklogd')
-rw-r--r-- | sys-apps/rsbac-admin/files/rklogd | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-apps/rsbac-admin/files/rklogd b/sys-apps/rsbac-admin/files/rklogd new file mode 100644 index 000000000000..9dd2a6270d49 --- /dev/null +++ b/sys-apps/rsbac-admin/files/rklogd @@ -0,0 +1,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 $? +} |