Skip to content

Commit

Permalink
shared-state-bat_hosts add cron and hotplug support
Browse files Browse the repository at this point in the history
  • Loading branch information
G10h4ck committed Mar 5, 2019
1 parent d9bf706 commit ca9c598
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/shared-state-bat_hosts/Makefile
Expand Up @@ -19,7 +19,8 @@ define Package/$(PKG_NAME)
CATEGORY:=LiMe
MAINTAINER:=Gioacchino Mazzurco <gio@altermundi.net>
URL:=http://libremesh.org
DEPENDS:=+lua +luci-lib-jsonc shared-state
DEPENDS:=+@BUSYBOX_CONFIG_ASH_RANDOM_SUPPORT +lua +luci-lib-jsonc \
shared-state
PKGARCH:=all
endef

Expand Down
@@ -0,0 +1,2 @@
#!/bin/sh
[ "x$ACTION" == "xifup" ] && ((/usr/bin/shared-state-publish_bat_hosts)&)
@@ -0,0 +1,3 @@
#!/bin/sh

echo "*/30 * * * * ((sleep $(($RANDOM % 1000)); shared-state-publish_bat_hosts)&)" >> /etc/crontabs/root

0 comments on commit ca9c598

Please sign in to comment.