diff options
author | Karel Kočí <karel.koci@nic.cz> | 2019-06-10 09:40:44 +0200 |
---|---|---|
committer | Karel Kočí <karel.koci@nic.cz> | 2019-06-10 09:53:18 +0200 |
commit | 44a16ca3253c1395671905a83d60fa8e604a273a (patch) | |
tree | 83a81b7eb88dd83419369e2061635bdc2f8f24c8 /admin/syslog-ng/files/syslog-ng.init | |
parent | 96df1c380f94128b00b17de169f41aebdb61b099 (diff) |
syslog-ng: improve init and fix service stop
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čí <karel.koci@nic.cz>
Diffstat (limited to 'admin/syslog-ng/files/syslog-ng.init')
-rw-r--r-- | admin/syslog-ng/files/syslog-ng.init | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/admin/syslog-ng/files/syslog-ng.init b/admin/syslog-ng/files/syslog-ng.init index 7b9488b28..b68c6574f 100644 --- a/admin/syslog-ng/files/syslog-ng.init +++ b/admin/syslog-ng/files/syslog-ng.init @@ -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 -} |