aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/syslog-ng-devel
diff options
context:
space:
mode:
authorrafan <rafan@FreeBSD.org>2007-03-19 14:28:09 +0800
committerrafan <rafan@FreeBSD.org>2007-03-19 14:28:09 +0800
commit113ad4dc8eaf3f75882af947e7e0fffba8624b28 (patch)
tree03d93fd0c0cbe33d2f2537797b908c9f05e9d3f6 /sysutils/syslog-ng-devel
parenta98e6228bbfc584b78f90d398e6fdc6b96f82bcf (diff)
downloadfreebsd-ports-gnome-113ad4dc8eaf3f75882af947e7e0fffba8624b28.tar.gz
freebsd-ports-gnome-113ad4dc8eaf3f75882af947e7e0fffba8624b28.tar.zst
freebsd-ports-gnome-113ad4dc8eaf3f75882af947e7e0fffba8624b28.zip
Merge rc script changes from syslog-ng port:
- Allow user to change parameters of start syslog-ng via vars rc.d script [1] - Allow user to purge klog(9) via vars rc.d script [2] PR: ports/98287 [1] and [2] Submitted by: Pavel Volkov [1], Brian A. Seklecki [2] Approved by: Ivan Lago <ivan.lago at ifom-ieo-campus.it> (maintainer)
Diffstat (limited to 'sysutils/syslog-ng-devel')
-rw-r--r--sysutils/syslog-ng-devel/Makefile1
-rw-r--r--sysutils/syslog-ng-devel/files/syslog-ng.sh.in12
2 files changed, 12 insertions, 1 deletions
diff --git a/sysutils/syslog-ng-devel/Makefile b/sysutils/syslog-ng-devel/Makefile
index 38a1f52415ca..16c1a1c845a0 100644
--- a/sysutils/syslog-ng-devel/Makefile
+++ b/sysutils/syslog-ng-devel/Makefile
@@ -7,6 +7,7 @@
PORTNAME= syslog-ng
PORTVERSION= 2.0.0
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://www.balabit.com/downloads/syslog-ng/2.0/src/
diff --git a/sysutils/syslog-ng-devel/files/syslog-ng.sh.in b/sysutils/syslog-ng-devel/files/syslog-ng.sh.in
index 341143b8a2f3..38d41485a74c 100644
--- a/sysutils/syslog-ng-devel/files/syslog-ng.sh.in
+++ b/sysutils/syslog-ng-devel/files/syslog-ng.sh.in
@@ -12,8 +12,12 @@
# to enable this service:
#
#syslog_ng_enable="YES"
+#syslog_ng_config="-u daemon"
+#syslog_ng_pid="/var/run/syslog-ng.pid"
#
+syslog_ng_purgeklog=${syslog_ng_purgeklog-"NO"}
+
. %%RC_SUBR%%
name=syslog_ng
@@ -21,13 +25,19 @@ rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/syslog-ng
required_files=%%PREFIX%%/etc/syslog-ng/syslog-ng.conf
-pidfile=/var/run/syslog.pid
extra_commands=reload
+
+if checkyesno syslog_ng_purgeklog; then
+ start_precmd="echo \"Purging klog(9)\" && sysctl -w kern.msgbuf_clear=1 $start_precmd";
+fi
+
stop_postcmd=stop_postcmd
load_rc_config $name
: ${syslog_ng_enable:="NO"}
+pidfile=${syslog_ng_pid:-"/var/run/syslog.pid"}
+command_args="-p ${pidfile} ${syslog_ng_config}"
stop_postcmd() {
rm -f $pidfile