From 355afe9da54a594a0069875dbf6bed3ab854e0b1 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 29 Jan 2014 17:17:49 +0100 Subject: [PATCH] Add stub gluon-status-page package --- gluon/gluon-status-page/Makefile | 37 +++++++++++++++++++ .../lib/gluon/status-page/www/index.html | 10 +++++ .../status-page/invariant/010-status-page | 13 +++++++ 3 files changed, 60 insertions(+) create mode 100644 gluon/gluon-status-page/Makefile create mode 100644 gluon/gluon-status-page/files/lib/gluon/status-page/www/index.html create mode 100755 gluon/gluon-status-page/files/lib/gluon/upgrade/status-page/invariant/010-status-page diff --git a/gluon/gluon-status-page/Makefile b/gluon/gluon-status-page/Makefile new file mode 100644 index 0000000..d0e9d48 --- /dev/null +++ b/gluon/gluon-status-page/Makefile @@ -0,0 +1,37 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=gluon-status-page +PKG_VERSION:=1 +PKG_RELEASE:=1 + +PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) + +include $(INCLUDE_DIR)/package.mk + +define Package/gluon-status-page + SECTION:=gluon + CATEGORY:=Gluon + TITLE:=Adds a status page showing information about the node. + DEPENDS:=+gluon-core +uhttpd +endef + +define Package/gluon-status-page/description + Adds a status page showing information about the node. + Especially useful in combination with the next-node feature. +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) +endef + +define Build/Configure +endef + +define Build/Compile +endef + +define Package/gluon-status-page/install + $(CP) ./files/* $(1)/ +endef + +$(eval $(call BuildPackage,gluon-status-page)) diff --git a/gluon/gluon-status-page/files/lib/gluon/status-page/www/index.html b/gluon/gluon-status-page/files/lib/gluon/status-page/www/index.html new file mode 100644 index 0000000..19911b8 --- /dev/null +++ b/gluon/gluon-status-page/files/lib/gluon/status-page/www/index.html @@ -0,0 +1,10 @@ + + + + +Status page ‒ TODO + + +

TODO

+ + diff --git a/gluon/gluon-status-page/files/lib/gluon/upgrade/status-page/invariant/010-status-page b/gluon/gluon-status-page/files/lib/gluon/upgrade/status-page/invariant/010-status-page new file mode 100755 index 0000000..ee7a58c --- /dev/null +++ b/gluon/gluon-status-page/files/lib/gluon/upgrade/status-page/invariant/010-status-page @@ -0,0 +1,13 @@ +#!/bin/sh + +uci batch <<-EOF + delete uhttpd.main.listen_http + add_list uhttpd.main.listen_http=0.0.0.0:80 + add_list uhttpd.main.listen_http=[::]:80 + + delete uhttpd.main.listen_https + + set uhttpd.main.home=/lib/gluon/status-page/www + + commit uhttpd +EOF