diff options
author | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
---|---|---|
committer | wbx <wbx@hydrogenium.(none)> | 2009-05-17 14:41:34 +0200 |
commit | 219a6dab8995aad9ac4860cc1a84d6f3509a03a4 (patch) | |
tree | b9c0f3c43aebba2fcfef777592d0add39f2072f4 /package/syslog-ng/files |
Initial import
Diffstat (limited to 'package/syslog-ng/files')
-rw-r--r-- | package/syslog-ng/files/syslog-ng.conf | 16 | ||||
-rw-r--r-- | package/syslog-ng/files/syslog-ng.init | 30 |
2 files changed, 46 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 000000000..658abead2 --- /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 100644 index 000000000..bdfa0c96e --- /dev/null +++ b/package/syslog-ng/files/syslog-ng.init @@ -0,0 +1,30 @@ +#!/bin/sh +#FWINIT 05 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${syslog_ng:-NO}" = x"NO" && exit 0 + exec sh $0 start + ;; +start) + [ -f /etc/syslog-ng/syslog-ng.conf ] || { + echo "/etc/syslog-ng/syslog-ng.conf does not exist !"; + exit 0; + }; + [ -x /usr/sbin/syslog-ng ] && /usr/sbin/syslog-ng + ;; +stop) + killall syslog-ng + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? |