pkgsrc-wip/syslog-ng2/files/syslogng.sh
Ondrej Tuma 2685f991c1 syslog-ng embodies the next generation of logging systems, and is the first
truly flexible and scalable system logging application.

If you need a logging application that

    * guarantees the availability of log messages,
    * is compatible with a wide range of operating systems,
    * can be used in environments having strong perimeter defense,
    * has already proven its worth,
    * provides unimaginable flexibility for tracing system events
2007-06-30 11:04:50 +00:00

34 lines
703 B
Bash

#!@RCD_SCRIPTS_SHELL@
#
# $NetBSD: syslogng.sh,v 1.1.1.1 2007/06/30 11:04:50 ondratu Exp $
#
# PROVIDE: syslogd
# REQUIRE: mountcritremote sysdb wscons
# BEFORE: SERVERS
if [ -f /etc/rc.subr ]; then
. /etc/rc.subr
fi
name="syslogng"
rcvar=${name}
ngname="syslog-ng"
command="@PREFIX@/sbin/${ngname}"
pidfile="@VARBASE@/run/${ngname}.pid"
required_files="@PKG_SYSCONFDIR@/${ngname}.conf"
extra_commands="reload checkconfig"
reload_cmd="syslogng_reload"
checkconfig_cmd="syslogng_checkconfig"
command_args="-p ${pidfile} -f ${required_files}"
syslogng_reload() {
kill -HUP `cat ${pidfile}`
}
syslogng_checkconfig() {
${command} -s -f ${required_files}
}
load_rc_config $name
run_rc_command "$1"