]> git.pld-linux.org Git - packages/rsyslog.git/commitdiff
- from fedora
authorSÅ‚awomir Paszkiewicz <paszczus@pld-linux.org>
Thu, 3 Jul 2008 09:36:15 +0000 (09:36 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rsyslog.conf -> 1.1
    rsyslog.init -> 1.1
    rsyslog.sysconfig -> 1.1

rsyslog.conf [new file with mode: 0644]
rsyslog.init [new file with mode: 0644]
rsyslog.sysconfig [new file with mode: 0644]

diff --git a/rsyslog.conf b/rsyslog.conf
new file mode 100644 (file)
index 0000000..fe3c4c9
--- /dev/null
@@ -0,0 +1,41 @@
+#rsyslog v3 config file
+
+# provides support for local system logging (e.g. via logger command)
+$ModLoad imuxsock.so 
+# provides kernel logging support (previously done by rklogd)
+$ModLoad imklog.so
+
+# provides --MARK-- message capability
+#$ModLoad immark.so  
+# provides UDP syslog reception
+#$ModLoad imudp.so  
+# provides TCP syslog reception and GSS-API (if compiled to support it)
+#$ModLoad imtcp.so  
+
+
+# Log all kernel messages to the console.
+# Logging much else clutters up the screen.
+#kern.*                                                 /dev/console
+
+# Log anything (except mail) of level info or higher.
+# Don't log private authentication messages!
+*.info;mail.none;authpriv.none;cron.none                /var/log/messages
+
+# The authpriv file has restricted access.
+authpriv.*                                              /var/log/secure
+
+# Log all the mail messages in one place.
+mail.*                                                  -/var/log/maillog
+
+
+# Log cron stuff
+cron.*                                                  /var/log/cron
+
+# Everybody gets emergency messages
+*.emerg                                                 *
+
+# Save news errors of level crit and higher in a special file.
+uucp,news.crit                                          /var/log/spooler
+
+# Save boot messages also to boot.log
+local7.*                                                /var/log/boot.log
diff --git a/rsyslog.init b/rsyslog.init
new file mode 100644 (file)
index 0000000..ba9c530
--- /dev/null
@@ -0,0 +1,99 @@
+#!/bin/bash
+#
+# rsyslog        Starts rsyslogd/rklogd.
+#
+#
+# chkconfig: - 12 88
+# description: Syslog is the facility by which many daemons use to log \
+# messages to various system log files.  It is a good idea to always \
+# run rsyslog.
+### BEGIN INIT INFO
+# Provides: $syslog
+# Required-Start: $local_fs $network $remote_fs
+# Required-Stop: $local_fs $network $remote_fs
+# Default-Stop: 0 1 2 3 4 5 6
+# Short-Description: Enhanced system logging and kernel message trapping daemons
+# Description: Rsyslog is an enhanced multi-threaded syslogd supporting, 
+#              among others, MySQL, syslog/tcp, RFC 3195, permitted 
+#              sender lists, filtering on any message part, and fine 
+#              grain output format control.
+### END INIT INFO
+
+# Source function library.
+. /etc/init.d/functions
+
+RETVAL=0
+
+start() {
+       [ -x /sbin/rsyslogd ] || exit 5
+
+       # Source config
+        if [ -f /etc/sysconfig/rsyslog ] ; then
+                . /etc/sysconfig/rsyslog
+       fi
+       umask 077
+
+        echo -n $"Starting system logger: "
+        daemon rsyslogd $SYSLOGD_OPTIONS
+        RETVAL=$?
+        echo
+        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rsyslog
+        return $RETVAL
+}
+stop() {
+        echo -n $"Shutting down system logger: "
+        killproc rsyslogd
+        RETVAL=$?
+        echo
+        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rsyslog
+        return $RETVAL
+}
+reload()  {
+    RETVAL=1
+    syslog=`cat /var/run/syslogd.pid 2>/dev/null`
+    echo -n "Reloading system logger..."
+    if [ -n "${syslog}" ] && [ -e /proc/"${syslog}" ]; then
+       kill -HUP "$syslog";
+       RETVAL=$?
+    fi
+    if [ $RETVAL -ne 0 ]; then
+       failure
+    else
+       success
+    fi
+    echo
+    return $RETVAL
+}
+rhstatus() {
+        status rsyslogd
+}
+restart() {
+        stop
+        start
+}
+
+case "$1" in
+  start)
+        start
+        ;;
+  stop)
+        stop
+        ;;
+  restart)
+        restart
+        ;;
+  reload|force-reload)
+       reload
+       ;;
+  status)
+        rhstatus
+        ;;
+  condrestart)
+        [ -f /var/lock/subsys/rsyslog ] && restart || :
+        ;;
+  *)
+        echo $"Usage: $0 {start|stop|restart|reload|force-reload|condrestart}"
+        exit 2
+esac
+
+exit $?
diff --git a/rsyslog.sysconfig b/rsyslog.sysconfig
new file mode 100644 (file)
index 0000000..ee80ff1
--- /dev/null
@@ -0,0 +1,5 @@
+# Options to syslogd
+# syslogd options are deprecated in rsyslog v3 
+# if you want to use them, switch to compatibility mode 2 by "-c 2"
+SYSLOGD_OPTIONS="-c 3"
+
This page took 0.099704 seconds and 4 git commands to generate.