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
4 changed files with 22 additions and 11 deletions
|
@ -2,13 +2,12 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=syslog-ng
|
PKG_NAME:=syslog-ng
|
||||||
PKG_VERSION:=3.9.1
|
PKG_VERSION:=3.9.1
|
||||||
PKG_RELEASE:=2
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
|
PKG_MAINTAINER:=W. Michael Petullo <mike@flyn.org>
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
|
PKG_SOURCE_URL:=https://github.com/balabit/syslog-ng/releases/download/$(PKG_NAME)-$(PKG_VERSION)/
|
||||||
PKG_MD5SUM:=1b48da9ef620cf06e55e481b5abb677a
|
|
||||||
PKG_HASH:=5678856a550ae790618fabde9d1447f932ce7a9080d55dca8fc5df1202c70a17
|
PKG_HASH:=5678856a550ae790618fabde9d1447f932ce7a9080d55dca8fc5df1202c70a17
|
||||||
|
|
||||||
PKG_INSTALL:=1
|
PKG_INSTALL:=1
|
||||||
|
@ -31,7 +30,8 @@ define Package/syslog-ng/description
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/syslog-ng/conffiles
|
define Package/syslog-ng/conffiles
|
||||||
/etc/syslog-ng.conf
|
/etc/syslog-ng.conf
|
||||||
|
/etc/syslog-ng.d/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/Configure
|
define Build/Configure
|
||||||
|
@ -69,8 +69,8 @@ define Package/syslog-ng/install
|
||||||
install-moduleLTLIBRARIES DESTDIR="$(1)"
|
install-moduleLTLIBRARIES DESTDIR="$(1)"
|
||||||
$(INSTALL_DIR) $(1)/etc/init.d
|
$(INSTALL_DIR) $(1)/etc/init.d
|
||||||
$(INSTALL_BIN) ./files/syslog-ng.init $(1)/etc/init.d/syslog-ng
|
$(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_DATA) ./files/syslog-ng.conf $(1)/etc
|
||||||
|
$(INSTALL_DIR) $(1)/etc/syslog-ng.d/
|
||||||
$(call libtool_remove_files,$(1))
|
$(call libtool_remove_files,$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
# place to put customization of logging
|
|
||||||
|
|
|
@ -36,5 +36,6 @@ log {
|
||||||
destination(messages);
|
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
|
# Copyright (C) 2006-2016 OpenWrt.org
|
||||||
|
|
||||||
START=20
|
START=20
|
||||||
|
PROG=/usr/sbin/syslog-ng
|
||||||
|
PROG2=/usr/sbin/syslog-ng-ctl
|
||||||
|
|
||||||
SERVICE_USE_PID=1
|
SERVICE_USE_PID=1
|
||||||
|
SERVICE_PID_FILE=/var/log/syslog-ng.pid
|
||||||
|
|
||||||
|
config_file=/etc/syslog-ng.conf
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
[ -f /etc/syslog-ng.conf ] || return 1
|
[ -f $config_file ] || return 1
|
||||||
service_start /usr/sbin/syslog-ng
|
|
||||||
|
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() {
|
stop() {
|
||||||
service_stop /usr/sbin/syslog-ng
|
service_stop $PROG
|
||||||
}
|
}
|
||||||
|
|
||||||
reload() {
|
reload() {
|
||||||
service_reload /usr/sbin/syslog-ng
|
$PROG2 reload
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue