xref: /freebsd/libexec/rc/rc.d/auditd (revision e6bfd18d21b225af6a0ed67ceeaf1293b7b9eba5)
1#!/bin/sh
2#
3# $FreeBSD$
4#
5# Start up for the Audit daemon.
6#
7
8# PROVIDE: auditd
9# REQUIRE: syslogd
10# BEFORE:  DAEMON
11# KEYWORD: nojail shutdown
12
13. /etc/rc.subr
14
15name="auditd"
16desc="Audit daemon"
17stop_cmd="auditd_stop"
18command="/usr/sbin/${name}"
19pidfile="/var/run/${name}.pid"
20rcvar="auditd_enable"
21command_args="${auditd_flags}"
22required_files="/etc/security/audit_class /etc/security/audit_control
23		/etc/security/audit_event /etc/security/audit_user
24		/etc/security/audit_warn"
25
26auditd_stop()
27{
28
29	/usr/sbin/audit -t
30	if [ -n "$rc_pid" ]; then
31		wait_for_pids $rc_pid
32	fi
33}
34
35load_rc_config $name
36run_rc_command "$1"
37