summaryrefslogtreecommitdiff
blob: 26daeca06218b0633fabf6daa4bbc9b8d9be4172 (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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 $?
}