]>
Commit | Line | Data |
---|---|---|
8a7820e6 AM |
1 | #!/bin/sh |
2 | # chkconfig: 2345 01 99 | |
3 | # description: AppArmor rc file. This rc script inserts the apparmor \ | |
4 | # module and runs the parser on the /etc/apparmor.d/ \ | |
5 | # directory. | |
6 | # | |
7 | ||
8 | # Source function library | |
9 | . /etc/rc.d/init.d/functions | |
10 | ||
11 | usage() { | |
12 | echo "Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status|kill}" | |
13 | } | |
14 | ||
15 | sd_log_skipped_msg() { | |
16 | echo -n "$*" | |
17 | #success | |
18 | echo | |
19 | } | |
20 | sd_log_success_msg() { | |
21 | echo -n "$*" | |
22 | #success | |
23 | echo | |
24 | } | |
25 | ||
26 | sd_log_warning_msg() { | |
27 | echo -n "$*" | |
28 | #warning | |
29 | echo | |
30 | } | |
31 | ||
32 | sd_log_failure_msg() { | |
33 | echo -n "$*" | |
34 | #failure | |
35 | echo | |
36 | } | |
37 | ||
38 | sd_action() { | |
39 | STRING=$1 | |
40 | shift | |
41 | run_cmd "$STRING" "$@" | |
42 | return $? | |
43 | } | |
44 | ||
45 | . /etc/apparmor/rc.apparmor.functions | |
46 | ||
47 | case "$1" in | |
48 | start) | |
49 | subdomain_start | |
50 | ;; | |
51 | stop) | |
52 | subdomain_stop | |
53 | ;; | |
54 | restart|reload|force-reload) | |
55 | subdomain_restart | |
56 | ;; | |
57 | try-restart) | |
58 | subdomain_try_restart | |
59 | ;; | |
60 | debug) | |
61 | subdomain_debug | |
62 | ;; | |
63 | kill) | |
64 | subdomain_kill | |
65 | ;; | |
66 | status) | |
67 | subdomain_status | |
68 | ;; | |
69 | *) | |
70 | usage | |
71 | exit 1 | |
72 | esac | |
73 | exit 0 | |
74 |