]> git.pld-linux.org Git - packages/apparmor-parser.git/blame - apparmor-parser.init
- limits.patch to build on old glibc (Ac)
[packages/apparmor-parser.git] / apparmor-parser.init
CommitLineData
5669b081 1#!/bin/bash
8a7820e6
AM
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
675f1211 11aa_log_skipped_msg() {
5669b081
AM
12 busy
13 fail
14 [ -n "$*" ] && echo "$*"
8a7820e6 15}
675f1211 16aa_log_success_msg() {
5669b081
AM
17 busy
18 ok
19 [ -n "$*" ] && echo "$*"
8a7820e6
AM
20}
21
675f1211 22aa_log_warning_msg() {
5669b081
AM
23 busy
24 fail
25 [ -n "$*" ] && echo "$*"
8a7820e6
AM
26}
27
675f1211 28aa_log_failure_msg() {
5669b081
AM
29 busy
30 fail
31 [ -n "$*" ] && echo "$*"
8a7820e6
AM
32}
33
675f1211 34aa_action() {
8a7820e6
AM
35 STRING=$1
36 shift
37 run_cmd "$STRING" "$@"
38 return $?
39}
40
41. /etc/apparmor/rc.apparmor.functions
42
679e1f68 43RETVAL=0
8a7820e6 44case "$1" in
679e1f68 45start)
5669b081
AM
46 msg_starting apparmor
47 started
675f1211 48 apparmor_start
679e1f68
ER
49 ;;
50stop)
5669b081
AM
51 msg_stopping apparmor
52 started
675f1211 53 apparmor_stop
679e1f68
ER
54 ;;
55restart|reload|force-reload)
5669b081
AM
56 msg_reloading apparmor
57 started
675f1211 58 apparmor_restart
679e1f68
ER
59 ;;
60try-restart)
5669b081
AM
61 msg_reloading
62 started
675f1211 63 apparmor_try_restart
679e1f68
ER
64 ;;
65debug)
675f1211 66 apparmor_debug
679e1f68
ER
67 ;;
68kill)
675f1211 69 apparmor_kill
679e1f68
ER
70 ;;
71status)
675f1211 72 apparmor_status
679e1f68
ER
73 ;;
74*)
75 msg_usage "$0 {start|stop|restart|try-restart|reload|force-reload|status|kill}"
76 exit 3
77esac
8a7820e6 78
679e1f68 79exit $RETVAL
This page took 0.237064 seconds and 4 git commands to generate.