Browse Source

ffho-luci-remote-syslog: new package

for configuration of a remote syslog server within expertmode.
Karsten Böddeker 7 years ago
parent
commit
2078e86a43

+ 38 - 0
ffho/ffho-luci-remote-syslog/Makefile

@@ -0,0 +1,38 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ffho-luci-remote-syslog
+PKG_VERSION:=1
+PKG_RELEASE:=$(GLUON_VERSION).$(GLUON_SITE_CODE)-$(GLUON_RELEASE).$(GLUON_CONFIG_VERSION)
+
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
+
+include $(GLUONDIR)/include/package.mk
+
+PKG_CONFIG_DEPENDS += $(GLUON_I18N_CONFIG)
+
+define Package/ffho-luci-remote-syslog
+  SECTION:=ffho
+  CATEGORY:=FFHO
+  TITLE:=Luci module for setting a remote syslog server
+  DEPENDS:=+gluon-luci-admin
+  MAINTAINER:=Freifunk Hochstift <kontakt@hochstift.freifunk.net>
+  URL:=https://git.c3pb.de/freifunk-pb/ffho-packages
+endef
+
+define Build/Prepare
+	mkdir -p $(PKG_BUILD_DIR)
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+	$(call GluonBuildI18N,ffho-luci-remote-syslog,i18n)
+endef
+
+define Package/ffho-luci-remote-syslog/install
+	$(CP) ./files/* $(1)/
+	$(call GluonInstallI18N,ffho-luci-remote-syslog,$(1))
+endef
+
+$(eval $(call BuildPackage,ffho-luci-remote-syslog))

+ 4 - 0
ffho/ffho-luci-remote-syslog/ReadMe.md

@@ -0,0 +1,4 @@
+ffho-luci-remote-syslog
+=======================
+
+Luci module for setting a remote syslog server.

+ 5 - 0
ffho/ffho-luci-remote-syslog/files/usr/lib/lua/luci/controller/admin/remote-syslog.lua

@@ -0,0 +1,5 @@
+module("luci.controller.admin.remote-syslog", package.seeall)
+
+function index()
+        entry({"admin", "remote-syslog"}, cbi("admin/remote-syslog"), _("Remote Syslog"), 85)
+end

+ 22 - 0
ffho/ffho-luci-remote-syslog/files/usr/lib/lua/luci/model/cbi/admin/remote-syslog.lua

@@ -0,0 +1,22 @@
+m = Map("system", translate("Remote Syslog"), translate(
+  "If you want to use a remote syslog server, you can set it up here."))
+m.pageaction = false
+m.template = "admin/expertmode"
+
+s = m:section(TypedSection, "system", nil)
+s.addremove = false
+s.anonymous = true
+
+o = s:option(Flag, "log_remote", translate("Enable"))
+o.rmempty = false
+
+o = s:option(Value, "log_ip", translate("IP"))
+o.placeholder = "0.0.0.0"
+o.datatype = "ipaddr"
+
+o = s:option(Value, "log_port", translate("Port"))
+o.placeholder = 514
+o.datatype = "port"
+
+return m
+

+ 10 - 0
ffho/ffho-luci-remote-syslog/i18n/de.po

@@ -0,0 +1,10 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8"
+
+msgid "If you want to use a remote syslog server, you can set it up here."
+msgstr ""
+"Wenn du einen Remote-Syslog-Server nutzen möchtest, dann kannst du ihn hier "
+"eintragen."
+
+msgid "Remote Syslog"
+msgstr "Remote-Syslog"

+ 8 - 0
ffho/ffho-luci-remote-syslog/i18n/ffho-luci-remote-syslog.pot

@@ -0,0 +1,8 @@
+msgid ""
+msgstr "Content-Type: text/plain; charset=UTF-8"
+
+msgid "If you want to use a remote syslog server, you can set it up here."
+msgstr ""
+
+msgid "Remote Syslog"
+msgstr ""