71e03d424b
Reduce supported syslog-ng ports to the latest syslog-ng supported by our upstream, oniedentity.com. Upstream does not officially support earlier releases. This commit reduces unofficial support expectations and allows us to rely totally on upstream for support. This commit copies syslog-ng from syslog-ng329, which contains the full history of the syslog-ng family of ports. Whereas syslog-ng became a meta-port many moons ago to support multiple versions of syslog-ng in the tree. We will only support syslog-ng supported by our upstream. Discussed wth: Peter Czanik (CzP) <peter.czanik@oneidentity.com> Balabit (a OneIdentity company) / syslog-ng upstream
59 lines
1.2 KiB
Bash
59 lines
1.2 KiB
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD: head/sysutils/syslog-ng/files/syslog-ng.in 340872 2014-01-24 00:14:07Z mat $
|
|
#
|
|
|
|
# PROVIDE: syslogd
|
|
# REQUIRE: mountcritremote cleanvar ldconfig
|
|
# BEFORE: SERVERS
|
|
|
|
#
|
|
# Add the following line to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
#syslog_ng_enable="YES"
|
|
#syslog_ng_flags="-u daemon"
|
|
#syslog_ng_pidfile="/var/run/syslog-ng.pid"
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=syslog_ng
|
|
rcvar=syslog_ng_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${syslog_ng_enable:="NO"}
|
|
: ${syslog_ng_purgeklog:="NO"}
|
|
: ${syslog_ng_config:="%%PREFIX%%/etc/syslog-ng.conf"}
|
|
: ${syslog_ng_pidfile:=/var/run/syslog.pid}
|
|
|
|
# backwards compatibility
|
|
if [ -n "${syslog_ng_pid}" ]; then
|
|
syslog_ng_pidfile="${syslog_ng_pid}"
|
|
fi
|
|
if [ ! -f "${syslog_ng_config}" ]; then
|
|
syslog_ng_flags="${syslog_ng_config}"
|
|
syslog_ng_config="%%PREFIX%%/etc/syslog-ng.conf"
|
|
fi
|
|
|
|
if checkyesno syslog_ng_purgeklog; then
|
|
start_precmd="echo \"Purging klog(9)\" && sysctl -w kern.msgbuf_clear=1"
|
|
fi
|
|
|
|
pidfile="${syslog_ng_pidfile}"
|
|
required_files="${syslog_ng_config}"
|
|
|
|
command="%%PREFIX%%/sbin/syslog-ng"
|
|
command_args="-f ${syslog_ng_config} -p ${pidfile}"
|
|
|
|
stop_postcmd="stop_postcmd"
|
|
extra_commands="reload"
|
|
|
|
stop_postcmd()
|
|
{
|
|
rm -f "${pidfile}"
|
|
}
|
|
|
|
run_rc_command "$1"
|