diff --git a/package/gluon-alfred/Makefile b/package/gluon-alfred/Makefile index 394edbd4..bb6926a5 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-cron +alfred +ethtool +luci-lib-json +luci-lib-core + DEPENDS:=+gluon-core +gluon-announce +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 6ddfe744..2d931625 100644 --- a/package/gluon-alfred/files/lib/gluon/cron/alfred +++ b/package/gluon-alfred/files/lib/gluon/cron/alfred @@ -1 +1 @@ -* * * * * /lib/gluon/alfred/announce.lua +* * * * * /lib/gluon/announce/announce.lua | gzip | alfred -s 158 diff --git a/package/gluon-announce/Makefile b/package/gluon-announce/Makefile new file mode 100644 index 00000000..81c35dfc --- /dev/null +++ b/package/gluon-announce/Makefile @@ -0,0 +1,32 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=gluon-announce +PKG_VERSION:=1 +PKG_RELEASE:=1 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/gluon-announce + SECTION:=gluon + CATEGORY:=Gluon + DEPENDS:=+gluon-core +luci-lib-json +ethtool + TITLE:=Lua scripts announcing various information +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/gluon-announce/install + $(CP) ./files/* $(1)/ +endef + +$(eval $(call BuildPackage,gluon-announce)) diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.d/hardware/model b/package/gluon-announce/files/lib/gluon/announce/announce.d/hardware/model similarity index 100% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.d/hardware/model rename to package/gluon-announce/files/lib/gluon/announce/announce.d/hardware/model diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.d/hostname b/package/gluon-announce/files/lib/gluon/announce/announce.d/hostname similarity index 100% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.d/hostname rename to package/gluon-announce/files/lib/gluon/announce/announce.d/hostname diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.d/network/mac b/package/gluon-announce/files/lib/gluon/announce/announce.d/network/mac similarity index 100% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.d/network/mac rename to package/gluon-announce/files/lib/gluon/announce/announce.d/network/mac diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.d/software/firmware b/package/gluon-announce/files/lib/gluon/announce/announce.d/software/firmware similarity index 100% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.d/software/firmware rename to package/gluon-announce/files/lib/gluon/announce/announce.d/software/firmware diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/idletime b/package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/idletime similarity index 100% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/idletime rename to package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/idletime diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/loadavg b/package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/loadavg similarity index 100% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/loadavg rename to package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/loadavg diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/memory b/package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/memory similarity index 100% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/memory rename to package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/memory diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/processes b/package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/processes similarity index 100% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/processes rename to package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/processes diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/uptime b/package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/uptime similarity index 100% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.d/statistics/uptime rename to package/gluon-announce/files/lib/gluon/announce/announce.d/statistics/uptime diff --git a/package/gluon-alfred/files/lib/gluon/alfred/announce.lua b/package/gluon-announce/files/lib/gluon/announce/announce.lua similarity index 75% rename from package/gluon-alfred/files/lib/gluon/alfred/announce.lua rename to package/gluon-announce/files/lib/gluon/announce/announce.lua index 23b3cd2c..e51445f7 100755 --- a/package/gluon-alfred/files/lib/gluon/alfred/announce.lua +++ b/package/gluon-announce/files/lib/gluon/announce/announce.lua @@ -1,7 +1,6 @@ #!/usr/bin/lua -local alfred_data_type = 158 -local announce_dir = '/lib/gluon/alfred/announce.d' +local announce_dir = '/lib/gluon/announce/announce.d' fs = require 'luci.fs' @@ -40,5 +39,4 @@ end encoder = json.Encoder(collect_dir(announce_dir)) -alfred = io.popen('gzip | alfred -s ' .. tostring(alfred_data_type), 'w') -ltn12.pump.all(encoder:source(), ltn12.sink.file(alfred)) +ltn12.pump.all(encoder:source(), ltn12.sink.file(io.stdout)) diff --git a/package/gluon-autoupdater/files/lib/gluon/alfred/announce.d/software/autoupdater b/package/gluon-autoupdater/files/lib/gluon/announce/announce.d/software/autoupdater similarity index 100% rename from package/gluon-autoupdater/files/lib/gluon/alfred/announce.d/software/autoupdater rename to package/gluon-autoupdater/files/lib/gluon/announce/announce.d/software/autoupdater diff --git a/package/gluon-mesh-batman-adv/files/lib/gluon/alfred/announce.d/network/addresses b/package/gluon-mesh-batman-adv/files/lib/gluon/announce/announce.d/network/addresses similarity index 100% rename from package/gluon-mesh-batman-adv/files/lib/gluon/alfred/announce.d/network/addresses rename to package/gluon-mesh-batman-adv/files/lib/gluon/announce/announce.d/network/addresses diff --git a/package/gluon-mesh-batman-adv/files/lib/gluon/alfred/announce.d/network/gateway b/package/gluon-mesh-batman-adv/files/lib/gluon/announce/announce.d/network/gateway similarity index 100% rename from package/gluon-mesh-batman-adv/files/lib/gluon/alfred/announce.d/network/gateway rename to package/gluon-mesh-batman-adv/files/lib/gluon/announce/announce.d/network/gateway diff --git a/package/gluon-mesh-batman-adv/files/lib/gluon/alfred/announce.d/software/batman-adv b/package/gluon-mesh-batman-adv/files/lib/gluon/announce/announce.d/software/batman-adv similarity index 100% rename from package/gluon-mesh-batman-adv/files/lib/gluon/alfred/announce.d/software/batman-adv rename to package/gluon-mesh-batman-adv/files/lib/gluon/announce/announce.d/software/batman-adv diff --git a/package/gluon-mesh-batman-adv/files/lib/gluon/alfred/announce.d/statistics/traffic b/package/gluon-mesh-batman-adv/files/lib/gluon/announce/announce.d/statistics/traffic similarity index 100% rename from package/gluon-mesh-batman-adv/files/lib/gluon/alfred/announce.d/statistics/traffic rename to package/gluon-mesh-batman-adv/files/lib/gluon/announce/announce.d/statistics/traffic diff --git a/package/gluon-mesh-vpn-fastd/files/lib/gluon/alfred/announce.d/software/fastd b/package/gluon-mesh-vpn-fastd/files/lib/gluon/announce/announce.d/software/fastd similarity index 100% rename from package/gluon-mesh-vpn-fastd/files/lib/gluon/alfred/announce.d/software/fastd rename to package/gluon-mesh-vpn-fastd/files/lib/gluon/announce/announce.d/software/fastd diff --git a/package/gluon-node-info/files/lib/gluon/alfred/announce.d/location b/package/gluon-node-info/files/lib/gluon/announce/announce.d/location similarity index 100% rename from package/gluon-node-info/files/lib/gluon/alfred/announce.d/location rename to package/gluon-node-info/files/lib/gluon/announce/announce.d/location diff --git a/package/gluon-node-info/files/lib/gluon/alfred/announce.d/owner b/package/gluon-node-info/files/lib/gluon/announce/announce.d/owner similarity index 100% rename from package/gluon-node-info/files/lib/gluon/alfred/announce.d/owner rename to package/gluon-node-info/files/lib/gluon/announce/announce.d/owner