diff options
author | Waldemar Brodkorb <wbx@openwrt.org> | 2006-03-15 13:40:51 +0000 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openwrt.org> | 2006-03-15 13:40:51 +0000 |
commit | 0b16ead0b75f956f7c8d9f8c46a238eb37d4f635 (patch) | |
tree | a404dab98675dce4f7f233759e48324b84149a4d /package/syslog-ng/files | |
parent | 64998fb03960ed5413093b93a2f31013199b86dc (diff) | |
download | upstream-0b16ead0b75f956f7c8d9f8c46a238eb37d4f635.tar.gz upstream-0b16ead0b75f956f7c8d9f8c46a238eb37d4f635.tar.bz2 upstream-0b16ead0b75f956f7c8d9f8c46a238eb37d4f635.zip |
add miau from Benjamin Binier, updated to newest upstream, thx. add syslog-ng from Sebastien Bourgasser, pending missing libol package
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@3378 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/syslog-ng/files')
-rw-r--r-- | package/syslog-ng/files/syslog-ng.conf | 16 | ||||
-rwxr-xr-x | package/syslog-ng/files/syslog-ng.init | 34 |
2 files changed, 50 insertions, 0 deletions
diff --git a/package/syslog-ng/files/syslog-ng.conf b/package/syslog-ng/files/syslog-ng.conf new file mode 100644 index 0000000000..658abead21 --- /dev/null +++ b/package/syslog-ng/files/syslog-ng.conf @@ -0,0 +1,16 @@ +options { + chain_hostnames(off); + sync(0); + + # The default action of syslog-ng 1.6.0 is to log a STATS line + # to the file every 10 minutes. That's pretty ugly after a while. + # Change it to every 12 hours so you get a nice daily update of + # how many messages syslog-ng missed (0). + stats(43200); +}; + +source src { unix-stream("/dev/log"); internal(); }; + +destination messages { file("/var/log/messages"); }; + +log { source(src); destination(messages); }; diff --git a/package/syslog-ng/files/syslog-ng.init b/package/syslog-ng/files/syslog-ng.init new file mode 100755 index 0000000000..40472ed3b9 --- /dev/null +++ b/package/syslog-ng/files/syslog-ng.init @@ -0,0 +1,34 @@ +#!/bin/sh + +syslog_start() { + [ -f /etc/syslog-ng/syslog-ng.conf ] || { + echo "/etc/syslog-ng/syslog-ng.conf does not exist !"; + exit 0; + }; + [ -d /var/run ] || mkdir -p /var/run + [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng +} + +syslog_stop() { + killall syslog-ng +} + +case "$1" in + start) + syslog_start + ;; + stop) + syslog_stop + ;; + restart) + syslog_stop + sleep 1s + syslog_start + ;; + reload) + kill -HUP `cat /var/run/syslog-ng.pid` &>/dev/null + ;; + *) + echo "Usage: $0 <start|stop|restart|reload>" + ;; +esac |