mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
imonitor: add package
Signed-off-by: Hrvoje Varga <hrvoje.varga@sartura.hr>
This commit is contained in:
parent
2ca35674da
commit
2adaa3ecf3
3 changed files with 79 additions and 0 deletions
42
imonitor/Makefile
Normal file
42
imonitor/Makefile
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
#
|
||||||
|
# Copyright (C) 2018 Inteno
|
||||||
|
#
|
||||||
|
|
||||||
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
|
PKG_NAME:=imonitor
|
||||||
|
PKG_VERSION:=1.0.0
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
|
||||||
|
PKG_SOURCE_PROTO=git
|
||||||
|
PKG_SOURCE_URL:=http://public.inteno.se/imonitor.git
|
||||||
|
PKG_SOURCE_VERSION:=defec6849fb987619fc7fd9295895f4f0b9db5a9
|
||||||
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||||
|
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
|
||||||
|
PKG_MAINTAINER:=Sartura Support for Inteno <support-inteno@sartura.hr>
|
||||||
|
PKG_INSTALL:=1
|
||||||
|
PKG_BUILD_PARALLEL:=1
|
||||||
|
|
||||||
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
include $(INCLUDE_DIR)/cmake.mk
|
||||||
|
|
||||||
|
define Package/imonitor
|
||||||
|
CATEGORY:=Utilities
|
||||||
|
TITLE:=Inteno process supervisor
|
||||||
|
DEPENDS:=+ubox +uci +ubus +rpcd +rpcd-mod-file
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/imonitor/description
|
||||||
|
imonitor is a process supervisor or a process control system similar to the Supervisor (http://supervisord.org/)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define Package/imonitor/install
|
||||||
|
$(CP) ./files/* $(1)/
|
||||||
|
$(INSTALL_DIR) $(1)/usr/bin
|
||||||
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/imonitor $(1)/usr/bin/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/config
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call BuildPackage,imonitor))
|
||||||
8
imonitor/files/etc/config/imonitor
Normal file
8
imonitor/files/etc/config/imonitor
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
config monitor
|
||||||
|
option app 'test'
|
||||||
|
option test 'echo test'
|
||||||
|
option stream 'stdout'
|
||||||
|
option string_match 'test'
|
||||||
|
option execute 'echo executing'
|
||||||
|
option interval '10'
|
||||||
|
option nr_tests '2'
|
||||||
29
imonitor/files/etc/init.d/imonitor
Executable file
29
imonitor/files/etc/init.d/imonitor
Executable file
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
#
|
||||||
|
# Start the imonitor
|
||||||
|
#
|
||||||
|
|
||||||
|
START=99
|
||||||
|
STOP=01
|
||||||
|
|
||||||
|
USE_PROCD=1
|
||||||
|
NAME=imonitor
|
||||||
|
|
||||||
|
start_service() {
|
||||||
|
procd_open_instance
|
||||||
|
procd_set_param command "imonitor"
|
||||||
|
procd_set_param stdout 1
|
||||||
|
procd_set_param stderr 1
|
||||||
|
procd_set_param respawn
|
||||||
|
procd_close_instance
|
||||||
|
}
|
||||||
|
|
||||||
|
stop() {
|
||||||
|
service_stop imonitor
|
||||||
|
}
|
||||||
|
|
||||||
|
reload_service() {
|
||||||
|
stop
|
||||||
|
start
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue