xinetd: do not restart service after config change if it is not running
authorHelge Mader <ma@dev.tdt.de>
Thu, 5 Nov 2020 12:09:55 +0000 (13:09 +0100)
committerHelge Mader <ma@dev.tdt.de>
Thu, 5 Nov 2020 13:29:38 +0000 (14:29 +0100)
Signed-off-by: Helge Mader <ma@dev.tdt.de>
net/xinetd/Makefile
net/xinetd/files/xinetd.init

index 84f915307a13e031def11995d7241f212e2d2f7a..2bf54ad9b6911b6b71c4b0f84f39cfc4fa0debc1 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=xinetd
 PKG_VERSION:=2.3.15
-PKG_RELEASE:=9
+PKG_RELEASE:=10
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/xinetd-org/xinetd/archive
index 207122381745fe3e1347893199326527f578113d..c08671735a8d60e9e9837eea93e3609402854fa9 100644 (file)
@@ -1,6 +1,8 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2006-2011 OpenWrt.org
 
+. /lib/functions.sh
+
 START=50
 STOP=10
 
@@ -119,8 +121,10 @@ start_service() {
 }
 
 reload_service() {
-       procd_send_signal xinetd "*" QUIT
-       start
+       procd_running xinetd "instance1" && {
+               procd_send_signal xinetd "*" QUIT
+               start
+       }
 }
 
 service_triggers() {