3 # auditd This starts and stops auditd
5 # chkconfig: 2345 18 87
6 # description: This starts the Linux Auditing System Daemon
8 # processname: /sbin/auditd
9 # config: /etc/sysconfig/auditd
10 # config: /etc/auditd.conf
11 # pidfile: /var/run/auditd.pid
13 PATH=/sbin:/bin:/usr/bin:/usr/sbin
15 # Source function library
16 . /etc/rc.d/init.d/functions
21 # Get service config - may override defaults
22 [ -f /etc/sysconfig/auditd ] && . /etc/sysconfig/auditd
26 # See how we were called.
29 if [ ! -f /var/lock/subsys/auditd ]; then
30 # show "Starting %s service" auditd
32 unset HOME MAIL USER USERNAME
33 daemon auditd "$EXTRAOPTIONS"
35 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/auditd
36 # Load the default rules
37 [ -f /etc/audit.rules ] && /sbin/auditctl -R /etc/audit.rules >/dev/null
39 # show "%s service is already running." auditd
40 msg_already_running auditd
44 if [ -f /var/lock/subsys/auditd ]; then
46 # show "Stopping %s service" auditd
49 rm -f /var/lock/subsys/auditd
50 # Remove watches so shutdown works cleanly
51 if ! is_no "$AUDITD_CLEAN_STOP"; then
52 /sbin/auditctl -D >/dev/null
55 # show "%s service is not running." auditd
56 msg_not_running auditd
65 if [ -f /var/lock/subsys/auditd ]; then
66 # show "Reload %s service" auditd
71 # show "%s service is not running." auditd
72 msg_not_running auditd >&2
81 # show "Usage: %s {start|stop|restart|reload|force-reload|status}"
82 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"