2
# ----------------------------------------------------------------------
3
# Copyright (c) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4
# NOVELL (All rights reserved)
6
# This program is free software; you can redistribute it and/or
7
# modify it under the terms of version 2 of the GNU General Public
8
# License published by the Free Software Foundation.
10
# This program is distributed in the hope that it will be useful,
11
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
# GNU General Public License for more details.
15
# You should have received a copy of the GNU General Public License
16
# along with this program; if not, contact Novell, Inc.
17
# ----------------------------------------------------------------------
18
# rc.apparmor by Steve Beattie
20
# /etc/init.d/aaeventd
21
# and its symbolic link
24
# chkconfig: 2345 01 99
25
# description: AppArmor Notification and Reporting daemon
29
# Required-Start: apparmor
31
# Default-Start: 2 3 5
33
# Short-Description: AppArmor Notification and Reporting
34
# Description: AppArmor Notification and Reporting daemon
36
APPARMOR_FUNCTIONS=/lib/apparmor/rc.apparmor.functions
38
# source function library
39
if [ -f /etc/init.d/functions ]; then
40
. /etc/init.d/functions
41
elif [ -f /etc/rc.d/init.d/functions ]; then
42
. /etc/rc.d/init.d/functions
43
elif [ -f /lib/lsb/init-functions ]; then
44
. /lib/lsb/init-functions
49
sd_log_success_msg() {
55
sd_log_warning_msg() {
61
sd_log_skipped_msg() {
67
sd_log_failure_msg() {
76
action "${STRING} " "$@"
81
if [ -x "$AA_EV_BIN" -a "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ] ; then
82
sd_action "Starting AppArmor Event daemon" daemon --pidfile $AA_EV_PIDFILE $AA_EV_BIN -p $AA_EV_PIDFILE
83
elif [ -x "$SD_EV_BIN" -a "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ] ; then
84
sd_action "Starting AppArmor Event daemon" daemon --pidfile $SD_EV_PIDFILE $SD_EV_BIN -p $SD_EV_PIDFILE
89
if [ -x "$AA_EV_BIN" -a -f "$AA_EV_PIDFILE" ] ; then
90
sd_action "Shutting down AppArmor Event daemon" killproc -p $AA_EV_PIDFILE -INT $AA_EV_BIN
92
if [ -f "$SD_EV_PIDFILE" ] ; then
93
sd_action "Shutting down AppArmor Event daemon" killproc -p $SD_EV_PIDFILE -INT $SD_EV_BIN
98
echo "Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}"
101
# source apparmor function library
102
if [ -f "${APPARMOR_FUNCTIONS}" ]; then
103
. ${APPARMOR_FUNCTIONS}
105
sd_log_failure_msg "Unable to find AppArmor initscript functions"
118
restart|reload|force-reload|try-restart)
124
echo -n "Checking for service AppArmor Event daemon:"
125
if [ "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ]; then
126
/sbin/checkproc -p $AA_EV_PIDFILE $AA_EV_BIN