diff options
Diffstat (limited to 'sys-apps/apparmor-parser/files/apparmor')
-rwxr-xr-x | sys-apps/apparmor-parser/files/apparmor | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/sys-apps/apparmor-parser/files/apparmor b/sys-apps/apparmor-parser/files/apparmor new file mode 100755 index 0000000..26daeca --- /dev/null +++ b/sys-apps/apparmor-parser/files/apparmor @@ -0,0 +1,55 @@ +#!/sbin/runscript +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ +# +# rc.apparmor.gentoo: contribuited by Matthew Snelham +# /etc/init.d/apparmor + +APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions +APPARMOR_HELPERS=/lib/apparmor/rc.helper.functions +if [ -f "${APPARMOR_HELPERS}" -a -f "${APPARMOR_FUNCTIONS}" ]; then + source ${APPARMOR_HELPERS} + source ${APPARMOR_FUNCTIONS} +else + eend 1 "Unable to find AppArmor initscript functions" +fi + +opts="${opts} reload status" + +depend() { + need localmount + ## AppArmor needs to be loaded before any other + ## (potentially protected) user-space services come up. + #before * +} + +start() { + ebegin "Starting AppArmor" + subdomain_start + einfo "...AppArmor Start" + eend $waserror +} + +stop() { + ebegin "Stopping AppArmor" + subdomain_stop + einfo "...AppArmor Stop" + eend $waserror +} + +restart() { + svc_stop; svc_start +} + +reload() { + ebegin "Restarting AppArmor" + subdomain_restart + eend $? +} + +status() { + ebegin "Checking AppArmor Status" + subdomain_status + eend $? +} |