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
30
# Required-Stop: $null
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
# Ugh, SUSE doesn't implement action
55
if [ $rc -eq 0 ] ; then
56
log_success_msg $"$STRING "
58
log_failure_msg $"$STRING "
63
sd_log_success_msg() {
67
sd_log_warning_msg() {
71
sd_log_failure_msg() {
76
echo "Usage: $0 {start|stop|restart|try-restart|reload|force-reload|status}"
80
if [ -x "$AA_EV_BIN" -a "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ] ; then
81
sd_action "Starting AppArmor Event daemon" startproc -p $AA_EV_PIDFILE $AA_EV_BIN -p $AA_EV_PIDFILE
82
elif [ -x "$SD_EV_BIN" -a "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ] ; then
83
sd_action "Starting AppArmor Event daemon" startproc -p $SD_EV_PIDFILE $SD_EV_BIN -p $SD_EV_PIDFILE
88
if [ -x "$AA_EV_BIN" -a -f "$AA_EV_PIDFILE" ] ; then
89
sd_action "Shutting down AppArmor Event daemon" killproc -G -p $AA_EV_PIDFILE -INT $AA_EV_BIN
91
if [ -f "$SD_EV_PIDFILE" ] ; then
92
sd_action "Shutting down AppArmor Event daemon" killproc -G -p $SD_EV_PIDFILE -INT $SD_EV_BIN
96
# source apparmor function library
97
if [ -f "${APPARMOR_FUNCTIONS}" ]; then
98
. ${APPARMOR_FUNCTIONS}
100
sd_log_failure_msg "Unable to find AppArmor initscript functions"
113
restart|reload|force-reload|try-restart)
119
echo -n "Checking for service AppArmor Event daemon:"
120
if [ "${APPARMOR_ENABLE_AAEVENTD}" = "yes" ]; then
121
/sbin/checkproc -p $AA_EV_PIDFILE $AA_EV_BIN