diff options
-rw-r--r-- | sysutils/syslog-ng/files/syslog-ng.sh.in | 12 | ||||
-rw-r--r-- | sysutils/syslog-ng1/files/syslog-ng.sh.in | 12 |
2 files changed, 22 insertions, 2 deletions
diff --git a/sysutils/syslog-ng/files/syslog-ng.sh.in b/sysutils/syslog-ng/files/syslog-ng.sh.in index 341143b8a2f3..38d41485a74c 100644 --- a/sysutils/syslog-ng/files/syslog-ng.sh.in +++ b/sysutils/syslog-ng/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 diff --git a/sysutils/syslog-ng1/files/syslog-ng.sh.in b/sysutils/syslog-ng1/files/syslog-ng.sh.in index 341143b8a2f3..38d41485a74c 100644 --- a/sysutils/syslog-ng1/files/syslog-ng.sh.in +++ b/sysutils/syslog-ng1/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 |