]> git.pld-linux.org Git - packages/audit.git/commitdiff
- PLDified from files included in package
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 28 Aug 2005 15:19:57 +0000 (15:19 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    auditd.init -> 1.1
    auditd.sysconfig -> 1.1

auditd.init [new file with mode: 0644]
auditd.sysconfig [new file with mode: 0644]

diff --git a/auditd.init b/auditd.init
new file mode 100644 (file)
index 0000000..2159d81
--- /dev/null
@@ -0,0 +1,86 @@
+#!/bin/sh
+#
+# auditd        This starts and stops auditd
+#
+# chkconfig: 2345 18 87
+# description: This starts the Linux Auditing System Daemon
+#
+# processname: /sbin/auditd
+# config: /etc/sysconfig/auditd
+# config: /etc/auditd.conf
+# pidfile: /var/run/auditd.pid
+
+PATH=/sbin:/bin:/usr/bin:/usr/sbin
+
+# Source function library
+. /etc/rc.d/init.d/functions
+
+AUDITD_CLEAN_STOP=yes
+EXTRAOPTIONS=
+
+# Get service config - may override defaults
+[ -f /etc/sysconfig/auditd ] && . /etc/sysconfig/auditd
+
+RETVAL=0
+
+# See how we were called.
+case "$1" in
+  start)
+       if [ ! -f /var/lock/subsys/auditd ]; then
+               # show "Starting %s service" auditd
+               msg_starting auditd
+               unset HOME MAIL USER USERNAME
+               daemon auditd "$EXTRAOPTIONS"
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/auditd
+               # Load the default rules
+               [ -f /etc/audit.rules ] && /sbin/auditctl -R /etc/audit.rules >/dev/null
+       else
+               # show "%s service is already running." auditd
+               msg_already_running auditd
+       fi
+       ;;
+  stop)
+       if [ -f /var/lock/subsys/auditd ]; then
+               # Stop daemons.
+               # show "Stopping %s service" auditd
+               msg_stopping auditd
+               killproc auditd
+               rm -f /var/lock/subsys/auditd
+               # Remove watches so shutdown works cleanly
+               if ! is_no "$AUDITD_CLEAN_STOP"; then
+                       /sbin/auditctl -D >/dev/null
+               fi
+       else
+               # show "%s service is not running." auditd
+               msg_not_running auditd
+       fi
+       ;;
+  restart)
+       $0 stop
+       $0 start
+       exit $?
+       ;;
+  reload|force-reload)
+       if [ -f /var/lock/subsys/auditd ]; then
+               # show "Reload %s service" auditd
+               msg_reloading auditd
+               killproc auditd -HUP
+               RETVAL=$?
+       else
+               # show "%s service is not running." auditd
+               msg_not_running auditd >&2
+               RETVAL=7
+       fi
+       ;;
+  status)
+       status auditd
+       RETVAL=$?
+       ;;
+  *)
+       # show "Usage: %s {start|stop|restart|reload|force-reload|status}"
+       msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
+       RETVAL=3
+esac
+
+exit $RETVAL
diff --git a/auditd.sysconfig b/auditd.sysconfig
new file mode 100644 (file)
index 0000000..ef7cd61
--- /dev/null
@@ -0,0 +1,15 @@
+# Customized settings for auditd
+
+# Nice level for auditd
+# SERVICE_RUN_NICE_LEVEL=0
+
+# Extra options for auditd
+# EXTRAOPTIONS=
+
+# You can set audit locale here
+# LC_ALL=C
+
+# This option is used to determine if rules & watches should be deleted on
+# shutdown. This is beneficial in most cases so that a watch doesn't linger
+# on a drive that is being unmounted. If set to no, it will NOT be cleaned up.
+AUDITD_CLEAN_STOP=yes
This page took 0.043218 seconds and 4 git commands to generate.