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

Rafał Miłecki zajec5 at gmail.com
Wed Jul 3 05:16:22 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/ubox/Makefile       | 2 +-
 package/system/ubox/files/log.init | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index 9631ac872f..6e67951929 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ubox
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git
diff --git a/package/system/ubox/files/log.init b/package/system/ubox/files/log.init
index 250f805b44..ba9c124c8b 100644
--- a/package/system/ubox/files/log.init
+++ b/package/system/ubox/files/log.init
@@ -96,3 +96,7 @@ start_service()
 	config_foreach validate_log_section system start_service_file
 	config_foreach validate_log_section system start_service_remote
 }
+
+service_running() {
+	procd_running log
+}
-- 
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