Skip to content

Commit

Permalink
ref_state: improve doc
Browse files Browse the repository at this point in the history
  • Loading branch information
javierajorge committed May 12, 2024
1 parent 991fa73 commit f4d2124
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/lua

--! LibreMesh
--! Will publish all refference data_type at once
--! Copyright (C) 2024 Javier Jorge
--! Copyright (C) 2024 Asociación Civil Altermundi <[email protected]>
--! SPDX-License-Identifier: AGPL-3.0-only
Expand All @@ -9,9 +10,8 @@ local JSON = require("luci.jsonc")
local utils = require "lime.utils"
local fs = require("nixio.fs")


local ref_file_folder = "/etc/shared-state/ref_state/"
--get data_type from publisher
--get data_type from file name
for data_type in fs.dir(ref_file_folder) do
local path = ref_file_folder .. data_type
local result = { [utils.hostname()] = utils.read_file(path .. data_type) }
Expand Down

0 comments on commit f4d2124

Please sign in to comment.