summaryrefslogtreecommitdiff
blob: db705c6aa7807d21057fb46d7630b24574dec073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/sbin/runscript
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-process/audit/files/auditd.initd-0.7.2-r1,v 1.1 2005/05/01 03:20:48 robbat2 Exp $

start() {
	ebegin "Starting auditd"
	start-stop-daemon \
		--start --quiet --pidfile /var/run/auditd.pid \
		--exec /sbin/auditd -- ${extraoptions}
	local ret=$?
	eend $ret
	if [ $ret -eq 0 -a -n "${rulefile}" -a -f "${rulefile}" ]; then
		einfo "Loading audit rules from ${rulefile}"
		/sbin/auditctl -R "${rulefile}"
		ret=$?
	fi
	return $ret
}

stop() {
	ebegin "Stopping auditd"
	start-stop-daemon \
		--stop --quiet --pidfile /var/run/auditd.pid
	eend $?
}