-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new reference state data types to shared state
- Loading branch information
1 parent
46e52ca
commit 4e89059
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# Copyright (C) 2019 Gioacchino Mazzurco <gio@altermundi.net> | ||
# Copyright (C) 2023 Javier Jorge <jjorge@inti.gob.ar> | ||
# | ||
# This is free software, licensed under the GNU Affero General Public License v3. | ||
# | ||
|
||
include $(TOPDIR)/rules.mk | ||
|
||
GIT_COMMIT_DATE:=$(shell git log -n 1 --pretty=%ad --date=short . ) | ||
GIT_COMMIT_TSTAMP:=$(shell git log -n 1 --pretty=%at . ) | ||
|
||
PKG_NAME:=shared-state-wifi_links_info | ||
PKG_VERSION=$(GIT_COMMIT_DATE)-$(GIT_COMMIT_TSTAMP) | ||
|
||
include $(INCLUDE_DIR)/package.mk | ||
|
||
define Package/$(PKG_NAME) | ||
TITLE:=Reference state datatypes module for shared-state | ||
CATEGORY:=LibreMesh | ||
URL:=http://libremesh.org | ||
DEPENDS:= shared-state | ||
PKGARCH:=all | ||
endef | ||
|
||
define Package/$(PKG_NAME)/description | ||
Syncronize Reference state datatypes using shared state multiwriter. | ||
endef | ||
|
||
define Build/Compile | ||
endef | ||
|
||
define Package/$(PKG_NAME)/install | ||
$(INSTALL_DIR) $(1)/ | ||
$(CP) ./files/* $(1)/ | ||
endef | ||
|
||
$(eval $(call BuildPackage,$(PKG_NAME))) |
10 changes: 10 additions & 0 deletions
10
...state-reference-state/files/etc/uci-defaults/shared-state-reference_state_nodes_info_cron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
unique_append() | ||
{ | ||
grep -qF "$1" "$2" || echo "$1" >> "$2" | ||
} | ||
|
||
unique_append \ | ||
'*/5 * * * * ((sleep $(($RANDOM % 120)); shared-state-multiwriter sync reference_state_nodes_info &> /dev/null)&)'\ | ||
/etc/crontabs/root |
10 changes: 10 additions & 0 deletions
10
...-reference-state/files/etc/uci-defaults/shared-state-reference_state_wifi_links_info_cron
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
unique_append() | ||
{ | ||
grep -qF "$1" "$2" || echo "$1" >> "$2" | ||
} | ||
|
||
unique_append \ | ||
'*/5 * * * * ((sleep $(($RANDOM % 120)); shared-state-multiwriter sync reference_state_wifi_links_info &> /dev/null)&)'\ | ||
/etc/crontabs/root |