[OpenWrt-Devel] [PATCH] rpcd: implement service_running() in init.d script

Rafał Miłecki zajec5 at gmail.com
Wed Jul 3 05:16:21 EDT 2019


From: Rafał Miłecki <rafal at milecki.pl>

It allows checking if service is running.

Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
---
 package/system/rpcd/Makefile        | 2 +-
 package/system/rpcd/files/rpcd.init | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile
index 11fe254d6f..854cc43cea 100644
--- a/package/system/rpcd/Makefile
+++ b/package/system/rpcd/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=rpcd
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
diff --git a/package/system/rpcd/files/rpcd.init b/package/system/rpcd/files/rpcd.init
index 4a31aa0d00..77ebcbe6cb 100755
--- a/package/system/rpcd/files/rpcd.init
+++ b/package/system/rpcd/files/rpcd.init
@@ -19,3 +19,6 @@ reload_service() {
 	procd_send_signal rpcd
 }
 
+service_running() {
+	procd_running rpcd
+}
-- 
2.21.0


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list