summaryrefslogtreecommitdiff
path: root/healthcheck
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-02-15 13:29:19 +0100
committerKarel Kočí <cynerd@email.cz>2022-02-15 13:29:19 +0100
commitadf136e41c30971c523088ea71b46f11a616939d (patch)
treea17882162f09a2aa6ee97e9b83911f2394514739 /healthcheck
parent0ed3e2856a5700363e72c9bdfc993d453d409764 (diff)
downloadopenwrt-personal-pkgs-adf136e41c30971c523088ea71b46f11a616939d.tar.gz
openwrt-personal-pkgs-adf136e41c30971c523088ea71b46f11a616939d.tar.bz2
openwrt-personal-pkgs-adf136e41c30971c523088ea71b46f11a616939d.zip
healthcheck: add to test the development version
Diffstat (limited to 'healthcheck')
-rw-r--r--healthcheck/Makefile49
-rw-r--r--healthcheck/files/cron2
2 files changed, 51 insertions, 0 deletions
diff --git a/healthcheck/Makefile b/healthcheck/Makefile
new file mode 100644
index 0000000..8faa1fb
--- /dev/null
+++ b/healthcheck/Makefile
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2021 CZ.NIC, z. s. p. o. (https://www.nic.cz/)
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=healthcheck
+PKG_SOURCE_URL:=https://gitlab.nic.cz/turris/healthcheck.git
+PKG_SOURCE_BRANCH:=dev
+
+PKG_MAINTAINER:=CZ.NIC <packaging@turris.cz>
+PKG_LICENSE:=GPL-3.0-or-later
+PKG_LICENSE_FILES:=COPYING
+
+include $(INCLUDE_DIR)/autopkg-branch.mk
+include $(INCLUDE_DIR)/package.mk
+include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk
+
+define Package/healthcheck
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=Healthcheck
+ URL:=https://gitlab.nic.cz/turris/healthcheck
+ DEPENDS:=\
+ +python3-humanize \
+ +python3-rich \
+ +python3-crontab \
+ +python3-uci
+ VARIANT:=python3
+endef
+
+define Package/healthcheck/description
+ Turris router health checking tool.
+endef
+
+define Py3Package/healthcheck/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+
+ $(INSTALL_DIR) $(1)/etc/cron.d
+ $(INSTALL_CONF) ./files/cron $(1)/etc/cron.d/healthcheck
+endef
+
+$(eval $(call Py3Package,healthcheck))
+$(eval $(call BuildPackage,healthcheck))
+$(eval $(call BuildPackage,healthcheck-src))
diff --git a/healthcheck/files/cron b/healthcheck/files/cron
new file mode 100644
index 0000000..32907f5
--- /dev/null
+++ b/healthcheck/files/cron
@@ -0,0 +1,2 @@
+MAILTO=""
+0-59/4 * * * * root LANG="$(uci -q get foris.settings.lang || echo en)" healthcheck --periodic