aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/rsyslog5/files
diff options
context:
space:
mode:
authorpgollucci <pgollucci@FreeBSD.org>2009-01-28 03:40:41 +0800
committerpgollucci <pgollucci@FreeBSD.org>2009-01-28 03:40:41 +0800
commit2ce0a815cf7d138c7f715f8505023dbd6b0fcef4 (patch)
treec546aff841e78eee6c584b26b3c1b05d35f30969 /sysutils/rsyslog5/files
parentda1b5d80c211460f413a9a2d5bc268ee6afe6c04 (diff)
downloadfreebsd-ports-gnome-2ce0a815cf7d138c7f715f8505023dbd6b0fcef4.tar.gz
freebsd-ports-gnome-2ce0a815cf7d138c7f715f8505023dbd6b0fcef4.tar.zst
freebsd-ports-gnome-2ce0a815cf7d138c7f715f8505023dbd6b0fcef4.zip
Rsyslog is an enhanced multi-threaded syslogd with a focus on security and
reliability. Among others, it offers support for on-demand disk buffering, reliable syslog over TCP, SSL, TLS and RELP, writing to databases (MySQL, PostgreSQL, Oracle, and many more), email alerting, fully configurable output formats (including high-precision timestamps),the ability to filter on any part of the syslog message, on-the-wire message compression, and the ability to convert text files to syslog. It is a drop-in replacement for stock syslogd and able to work with the same configuration file syntax. Its advanced features make it suitable for enterprise-class, encryption protected syslog relay chains while at the same time being very easy to setup for the novice user. Version 4.x.x is still in devel stage and can show stability issues. WWW: http://www.rsyslog.com/ PR: ports/130014 Submitted by: Cristiano Rolim Pereira <cristianorolim at hotmail.com>
Diffstat (limited to 'sysutils/rsyslog5/files')
-rw-r--r--sysutils/rsyslog5/files/pkg-message.in16
-rw-r--r--sysutils/rsyslog5/files/rsyslogd.in77
2 files changed, 93 insertions, 0 deletions
diff --git a/sysutils/rsyslog5/files/pkg-message.in b/sysutils/rsyslog5/files/pkg-message.in
new file mode 100644
index 000000000000..fd027fff9592
--- /dev/null
+++ b/sysutils/rsyslog5/files/pkg-message.in
@@ -0,0 +1,16 @@
+===================================================================
+To start using rsyslogd(8), stop syslogd(8) if it's running and
+add the following lines to rc.conf(5):
+ syslogd_enable="NO"
+ rsyslogd_enable="YES"
+To avoid warnings about rsyslogd running in compatibility mode, add
+this:
+ rsyslogd_flags="-c3"
+It's recommended to copy syslog.conf(5) to
+%%PREFIX%%/etc/rsyslog.conf and edit it there. Otherwise add
+this:
+ rsyslogd_config="/etc/syslog.conf"
+newsyslog(8) has the path of syslogd's pid file hardcoded. To
+make it work seamlessly with rsyslog, add this:
+ rsyslogd_pidfile="/var/run/syslog.pid"
+===================================================================
diff --git a/sysutils/rsyslog5/files/rsyslogd.in b/sysutils/rsyslog5/files/rsyslogd.in
new file mode 100644
index 000000000000..c4997460783e
--- /dev/null
+++ b/sysutils/rsyslog5/files/rsyslogd.in
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: rsyslogd
+# REQUIRE: mountcritremote cleanvar newsyslog ldconfig
+# BEFORE: SERVERS
+
+. %%RC_SUBR%%
+
+name=rsyslogd
+rcvar=`set_rcvar`
+command="%%PREFIX%%/sbin/${name}"
+load_rc_config $name
+: ${rsyslogd_enable:="NO"}
+: ${rsyslogd_pidfile:="/var/run/rsyslogd.pid"}
+: ${rsyslogd_config:="%%PREFIX%%/etc/rsyslog.conf"}
+pidfile="${rsyslogd_pidfile}"
+command_args="-i ${pidfile} -f ${rsyslogd_config}"
+required_files="${rsyslogd_config}"
+start_precmd="rsyslogd_precmd"
+extra_commands="reload"
+
+sockfile="/var/run/rsyslogd.sockets"
+evalargs="rc_flags=\"\`set_socketlist\` \$rc_flags\""
+altlog_proglist="named"
+
+rsyslogd_precmd()
+{
+ local _l _ldir
+
+ # Transitional symlink for old binaries
+ #
+ if [ ! -L /dev/log ]; then
+ ln -sf /var/run/log /dev/log
+ fi
+ rm -f /var/run/log
+
+ # Create default list of syslog sockets to watch
+ #
+ ( umask 022 ; > $sockfile )
+
+ # If running named(8) or ntpd(8) chrooted, added appropriate
+ # syslog socket to list of sockets to watch.
+ #
+ for _l in $altlog_proglist; do
+ eval _ldir=\$${_l}_chrootdir
+ if checkyesno `set_rcvar $_l` && [ -n "$_ldir" ]; then
+ echo "${_ldir}/var/run/log" >> $sockfile
+ fi
+ done
+
+ # If other sockets have been provided, change run_rc_command()'s
+ # internal copy of $rsyslogd_flags to force use of specific
+ # rsyslogd sockets.
+ #
+ if [ -s $sockfile ]; then
+ echo "/var/run/log" >> $sockfile
+ eval $evalargs
+ fi
+
+ return 0
+}
+
+set_socketlist()
+{
+ local _s _socketargs
+
+ _socketargs=
+ for _s in `cat $sockfile | tr '\n' ' '` ; do
+ _socketargs="-a $_s $_socketargs"
+ done
+ echo $_socketargs
+}
+
+run_rc_command "$1"