Compare commits

...

20 Commits

Author SHA1 Message Date
Arun muthusamy
30b735488f update package version 2018-04-30 15:59:22 +02:00
Arun muthusamy
d5c726e128 update package version 2018-04-27 09:33:05 +02:00
Arun muthusamy
0897acd716 change verbose flag 2018-04-25 17:10:03 +02:00
Arun muthusamy
7ceb98af7c update package version 2018-04-25 12:30:05 +02:00
Arun muthusamy
cc9a970851 update package verison 2018-04-24 13:55:17 +02:00
Arun muthusamy
1cca61127c change config verbose value 2018-04-24 13:53:55 +02:00
Arun muthusamy
4a287bd20c update feed inteno package hash 2018-04-18 15:38:23 +02:00
Arun muthusamy
b880f42127 update deamon name 2018-04-17 13:32:02 +02:00
Arun muthusamy
78ced1ca0b remove default variable 2018-04-17 11:48:42 +02:00
Arun muthusamy
c8cf06c846 update: package version hash 2018-04-17 09:42:55 +02:00
Arun muthusamy
a4151e2215 onboarding: uci config & procd implementation 2018-04-17 09:36:40 +02:00
Arun muthusamy
ddf6e9df0e change package version hash 2018-04-12 13:03:09 +02:00
Arun muthusamy
176bda08f2 include both application name 2018-04-12 13:03:09 +02:00
Arun muthusamy
8d23c95091 update PKG SRC VERSION 2018-04-12 13:03:09 +02:00
Arun muthusamy
de49665df4 package version number changed 2018-04-12 13:03:09 +02:00
Arun muthusamy
1582be367d rm garbage data 2018-04-12 13:03:09 +02:00
Arun muthusamy
83e327954b hurl updated 2018-04-12 13:03:09 +02:00
Arun muthusamy
24d6eebe24 changed from git to http 2018-04-12 13:03:09 +02:00
Arun muthusamy
e189603dbb repo updated 2018-04-12 13:03:09 +02:00
Arun muthusamy
04bffc4ca4 onboarding2 2018-04-12 13:03:09 +02:00
3 changed files with 128 additions and 0 deletions

40
onboardingd/Makefile Normal file
View File

@@ -0,0 +1,40 @@
#
# Copyright (C) 2013 Inteno
#
include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=onboardingd
PKG_VERSION:=0.0.1
PKG_SOURCE_VERSION:=899bf663b974c8b017995bad60e850461921c54a
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git@private.inteno.se:iopsys-onboarding.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/onboardingd
CATEGORY:=Utilities
DEPENDS:=+libjson-c +libuci +libubox +ubus +libpthread +TARGET_iopsys_ramips:swconfig +TARGET_iopsys_ramips:libnl-tiny +libopenssl +libmosquitto
TITLE:=router info daemon
endef
define Package/onboardingd/description
onboardingd collects system and network information and presents
this information via ubus
endef
define Package/onboardingd/install
$(CP) ./files/* $(1)/
$(INSTALL_DIR) $(1)/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/monitor $(1)/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/display_json_diff $(1)/sbin/
endef
$(eval $(call BuildPackage,onboardingd))

View File

@@ -0,0 +1,4 @@
config onboarding onboarding
option verbose 'debug'
option file_path '/root/app_data/access_points.json'

View File

@@ -0,0 +1,84 @@
#!/bin/sh /etc/rc.common
START=14
STOP=96
USE_PROCD=1
NAME=onboardingd
MONITOR="/sbin/monitor"
DISPLAY_JSON_DIFF="/sbin/display_json_diff"
start_service() {
#configuration
config_load onboarding
config_get verbose onboarding verbose
config_get file_path onboarding file_path
set -x
#exec 2> /root/log
echo $file_path
echo $verbose
#display json diff deamon
procd_open_instance
procd_set_param command $MONITOR
#if [ "$verbose" == "debug" -o "$verbose" == "1" -o "$verbose" == "on" ]
if [ "$verbose" == "debug" ]
then
echo "verbose == debug"
procd_append_param command --verbose debug
fi
if [ "$file_path" ]
then
procd_append_param command --path "$file_path"
fi
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param respawn ${threshold:-20} ${timeout:-5} ${retry:-3}
procd_close_instance
#display json diff deamon
procd_open_instance
procd_set_param command $DISPLAY_JSON_DIFF
#if [ "$verbose" == "debug" -o "$verbose" == "1" -o "$verbose" == "on" ]
if [ "$verbose" == "debug" ]
then
echo "verbose == debug"
procd_append_param command --verbose debug
fi
if [ "$file_path" ]
then
procd_append_param command --path "$file_path"
fi
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param respawn ${threshold:-20} ${timeout:-5} ${retry:-3}
procd_close_instance
set +x
}
stop() {
#stop_service() is called after procd killed the service
echo ;
}
service_triggers()
{
procd_add_reload_trigger onboarding
}
#reload_service() {
#
#}