diff --git a/package/gluon-alfred/Makefile b/package/gluon-alfred/Makefile index bb6926a5..8ddabdd2 100644 --- a/package/gluon-alfred/Makefile +++ b/package/gluon-alfred/Makefile @@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/package.mk define Package/gluon-alfred SECTION:=gluon CATEGORY:=Gluon - DEPENDS:=+gluon-core +gluon-announce +gluon-cron +alfred + DEPENDS:=+gluon-core +gluon-announced +gluon-neighbour-info +gluon-cron +alfred TITLE:=Configure alfred endef diff --git a/package/gluon-alfred/files/lib/gluon/cron/alfred b/package/gluon-alfred/files/lib/gluon/cron/alfred index 9f79bc64..87c052b2 100644 --- a/package/gluon-alfred/files/lib/gluon/cron/alfred +++ b/package/gluon-alfred/files/lib/gluon/cron/alfred @@ -1 +1 @@ -* * * * * /lib/gluon/announce/collect.lua nodeinfo | gzip | alfred -s 158; /lib/gluon/announce/collect.lua statistics | gzip | alfred -s 159; /lib/gluon/announce/collect.lua neighbours | gzip | alfred -s 160 +* * * * * gluon-neighbour-info -d ::1 -p 1001 -t 1 -c 1 -r nodeinfo | gzip | alfred -s 158; gluon-neighbour-info -d ::1 -p 1001 -t 1 -c 1 -r statistics | gzip | alfred -s 159; gluon-neighbour-info -d ::1 -p 1001 -t 1 -c 1 -r neighbours | gzip | alfred -s 160 diff --git a/package/gluon-status-page-api/files/lib/gluon/status-page/www/cgi-bin/dyn/statistics b/package/gluon-status-page-api/files/lib/gluon/status-page/www/cgi-bin/dyn/statistics index 194564b9..f93a10b4 100755 --- a/package/gluon-status-page-api/files/lib/gluon/status-page/www/cgi-bin/dyn/statistics +++ b/package/gluon-status-page-api/files/lib/gluon/status-page/www/cgi-bin/dyn/statistics @@ -1,18 +1,5 @@ -#!/usr/bin/lua +#!/bin/sh -local announce = require 'gluon.announce' -local json = require 'luci.jsonc' -local util = require 'luci.util' -local nixio = require 'nixio' +echo "Access-Control-Allow-Origin: *" -local announce_dir = '/lib/gluon/announce/statistics.d/' - -io.write("Access-Control-Allow-Origin: *\n") -io.write("Content-type: text/event-stream\n\n") - -while true do - local data = json.stringify(announce.collect_dir(announce_dir)) - io.write("data: " .. data .. "\n\n") - io.flush() - nixio.nanosleep(1, 0) -end +exec gluon-neighbour-info -s "" -l -d ::1 -p 1001 -t 1 -r statistics diff --git a/package/gluon-status-page-api/files/lib/gluon/status-page/www/cgi-bin/nodeinfo b/package/gluon-status-page-api/files/lib/gluon/status-page/www/cgi-bin/nodeinfo index 78789244..d34381fa 100755 --- a/package/gluon-status-page-api/files/lib/gluon/status-page/www/cgi-bin/nodeinfo +++ b/package/gluon-status-page-api/files/lib/gluon/status-page/www/cgi-bin/nodeinfo @@ -1,15 +1,8 @@ -#!/usr/bin/lua +#!/bin/sh -local announce = require 'gluon.announce' -local json = require 'luci.jsonc' -local util = require 'luci.util' -local nixio = require 'nixio' +cat <