syslog-ng: improve init and fix service stop
authorKarel Kočí <redacted>
Mon, 10 Jun 2019 07:40:44 +0000 (09:40 +0200)
committerKarel Kočí <redacted>
Mon, 10 Jun 2019 07:53:18 +0000 (09:53 +0200)
This fixes service stop. Problem was that in default syslog-ng forks to
background which causes procd to loose track of it. It no longer has in
such case PID of syslog-ng process and is unable to stop it. This means
that instance for such process hangs in procd and also it is not
possible to stop it as daemon. Fix is simple. syslog-ng is now
instructed to run in foreground.

This commit also drops unnecessary reload section. In default reload
calls restart and restart in default is implemented as calling stop and
start. This means that effectively it is implemented same as in case of
this init reload service implementation.

Signed-off-by: Karel Kočí <redacted>
admin/syslog-ng/Makefile
admin/syslog-ng/files/syslog-ng.init

index d1a1664e5c020c23abbd1546fb8667ed84eec669..699bd3e3278ad0e9c87c85654a56b1c8ce259ab4 100644 (file)
@@ -2,7 +2,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=syslog-ng
 PKG_VERSION:=3.21.1
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_MAINTAINER:=Josef Schlehofer <josef.schlehofer@nic.cz>
 PKG_LICENSE:=LGPL-2.1+
index 7b9488b2806dc78ee149d98a4d3835db5c7402cd..b68c6574f5bf9e6530f5d0623ed9a7ce040b4ff0 100644 (file)
@@ -1,5 +1,5 @@
 #!/bin/sh /etc/rc.common
-# Copyright (C) 2006-2016 OpenWrt.org
+# Copyright (C) 2006-2019 OpenWrt.org
 
 START=50
 
@@ -8,11 +8,6 @@ USE_PROCD=1
 start_service() {
        [ -f /etc/syslog-ng.conf ] || return 1
        procd_open_instance
-       procd_set_param command /usr/sbin/syslog-ng
+       procd_set_param command /usr/sbin/syslog-ng --foreground
        procd_close_instance
 }
-
-reload_service() {
-        stop
-        start
-}
git clone https://git.99rst.org/PROJECT