Merge pull request #4610 from pprindeville/syslog-ng-fix-reload
syslog-ng: use syslog-ng-ctl to handle reload operation
This commit is contained in:
commit
fb54ca1ef5
|
@ -2,13 +2,12 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=syslog-ng
|
||||
PKG_VERSION:=3.9.1
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
|
||||
PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a
|
||||
PKG_HASH:=5678856a550ae790618fabde9d1447f932ce7a9080d55dca8fc5df1202c70a17
|
||||
|
||||
PKG_INSTALL:=1
|
||||
|
@ -31,7 +30,8 @@ define Package/syslog-ng/description
|
|||
endef
|
||||
|
||||
define Package/syslog-ng/conffiles
|
||||
/etc/syslog-ng.conf
|
||||
/etc/syslog-ng.conf
|
||||
/etc/syslog-ng.d/
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
|
@ -69,8 +69,8 @@ define Package/syslog-ng/install
|
|||
install-moduleLTLIBRARIES DESTDIR="$(1)"
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_DATA) ./files/syslog-ng.conf $(1)/etc
|
||||
$(INSTALL_DIR) $(1)/etc/syslog-ng.d/
|
||||
$(call libtool_remove_files,$(1))
|
||||
endef
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
# place to put customization of logging
|
||||
|
|
@ -36,5 +36,6 @@ log {
|
|||
destination(messages);
|
||||
};
|
||||
|
||||
@include "/etc/custom-logs.conf"
|
||||
# put any customization files in this directory
|
||||
@include "/etc/syslog-ng.d/"
|
||||
|
||||
|
|
|
@ -2,18 +2,30 @@
|
|||
# Copyright (C) 2006-2016 OpenWrt.org
|
||||
|
||||
START=20
|
||||
PROG=/usr/sbin/syslog-ng
|
||||
PROG2=/usr/sbin/syslog-ng-ctl
|
||||
|
||||
SERVICE_USE_PID=1
|
||||
SERVICE_PID_FILE=/var/log/syslog-ng.pid
|
||||
|
||||
config_file=/etc/syslog-ng.conf
|
||||
|
||||
start() {
|
||||
[ -f /etc/syslog-ng.conf ] || return 1
|
||||
service_start /usr/sbin/syslog-ng
|
||||
[ -f $config_file ] || return 1
|
||||
|
||||
if ! $PROG -s 2>/dev/null ; then
|
||||
echo "Couldn't parse $(basename $config_file)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
service_start $PROG --process-mode background \
|
||||
-p $SERVICE_PID_FILE
|
||||
}
|
||||
|
||||
stop() {
|
||||
service_stop /usr/sbin/syslog-ng
|
||||
service_stop $PROG
|
||||
}
|
||||
|
||||
reload() {
|
||||
service_reload /usr/sbin/syslog-ng
|
||||
$PROG2 reload
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue