Skip to content

ubus-lime-utils


ProcedureSignatureDescription
get_cloud_nodes{}Get cloud nodes
safe_rebootGet safe-reboot status
safe_reboot{ "action": "start", "value": {"wait": TIME, "fallback": TIME } }After backing up /overlay/upper/etc, wait for TIME (value.wait) before reboot (Default: 5min). After boot, wait for TIME (value.fallback) before reverting /overlay/upper/etc from backup found in /overlay/upper/.etc.last-good.tgz (Default: 10min).
TIME examples: 1hour 60min 60m 3600sec 3600 (all of them are equivalent)
safe_rebootDo not make /overlay/upper/etc backup; instead check that there's one already in place (/overlay/upper/.etc.last-good.tgz,then reboot and wait for fallback timeout.
safe_rebootRemove /overlay/upper/.etc.last-good.tgz (useful after a successful reboot)
safe_rebootRestores /overlay/upper/etc from /overlay/upper/.etc.last-good.tgz (useful to discard changes)
get_community_settings{}Returns custom values for the community, this is useful for limeApp
get_config{}Returns wifi and netwrok configuration from /etc/config/lime
set_notesWrite notes to /etc/banner
get_notes{}Get notes fom /etc/banner
change_configChange the name of the router and the ipv4
get_node_status{}Returns the state of the node (uptime, ipv4 and ipv6 addresses, most active link, etc)

Examples

ubus -v list lime-utils

'lime-utils' @fb3a2ef0
	"get_cloud_nodes":{"no_params":"Integer"}
	"get_community_settings":{"no_params":"Integer"}
	"get_config":{"no_params":"Integer"}
	"set_notes":{"text":"String"}
	"change_config":{"name":"String","ip":"String"}
	"safe_reboot":{"action":"String","value":"String"}
	"get_notes":{"no_params":"Integer"}
	"get_node_status":{"no_params":"Integer"}

Makefile

include ../../libremesh.mk

define Package/$(PKG_NAME)
  SECTION:=ubus
  CATEGORY:=Ubus
  MAINTAINER:=Santiago Piccinini <spiccinini@altermundi.net>
  SUBMENU:=3. Applications
  TITLE:=LIbremesh ubus utils module
  DEPENDS:= +lua +libubox-lua +libubus-lua +libuci +lime-system +libiwinfo-lua +cgi-io +rpcd-mod-file \
	    +luci-lib-jsonc

  PKGARCH:=all
endef

$(eval $(call BuildPackage,$(PKG_NAME)))

undefined