Skip to content
Snippets Groups Projects
Commit 0312167f authored by NeoRaider's avatar NeoRaider
Browse files

Merge pull request #36 from freifunk-gluon/gluon-announce

gluon-announce: detach announce.d from alfred
parents 4d80b7a6 318e9d1a
No related branches found
No related tags found
No related merge requests found
Showing
with 36 additions and 6 deletions
......@@ -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
......
* * * * * /lib/gluon/alfred/announce.lua
* * * * * /lib/gluon/announce/announce.lua | gzip | alfred -s 158
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))
#!/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))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment