secubox-openwrt/package/secubox/secubox-app-glances/Makefile
CyberMind-FR 4004f2bfe8 feat(glances): Add Glances system monitoring module
Add secubox-app-glances and luci-app-glances packages:

secubox-app-glances:
- LXC container with nicolargo/glances:latest-full Docker image
- Web UI on port 61208, API on port 61209
- UCI configuration for monitoring options and alert thresholds
- glancesctl management script

luci-app-glances:
- Dashboard view with service status and quick actions
- Embedded Web UI view with iframe
- Settings view for configuration
- RPCD backend with proper ACL permissions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-21 07:38:37 +01:00

71 lines
1.6 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=secubox-app-glances
PKG_RELEASE:=1
PKG_VERSION:=1.0.0
PKG_ARCH:=all
PKG_MAINTAINER:=CyberMind Studio <contact@cybermind.fr>
PKG_LICENSE:=LGPL-3.0
include $(INCLUDE_DIR)/package.mk
define Package/secubox-app-glances
SECTION:=utils
CATEGORY:=Utilities
PKGARCH:=all
SUBMENU:=SecuBox Apps
TITLE:=SecuBox Glances System Monitor (LXC)
DEPENDS:=+uci +libuci +wget +tar
endef
define Package/secubox-app-glances/description
Glances - Cross-platform system monitoring tool for SecuBox.
Features:
- Real-time CPU, memory, disk, network monitoring
- Process list with resource usage
- Docker/Podman container monitoring
- Web-based UI accessible from any device
- RESTful JSON API for integrations
- Alert system for thresholds
Runs in LXC container for isolation and security.
Configure in /etc/config/glances.
endef
define Package/secubox-app-glances/conffiles
/etc/config/glances
endef
define Build/Compile
endef
define Package/secubox-app-glances/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/etc/config/glances $(1)/etc/config/glances
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/glances $(1)/etc/init.d/glances
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/usr/sbin/glancesctl $(1)/usr/sbin/glancesctl
endef
define Package/secubox-app-glances/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
echo ""
echo "Glances installed."
echo ""
echo "To install and start Glances:"
echo " glancesctl install"
echo " /etc/init.d/glances start"
echo ""
echo "Web interface: http://<router-ip>:61208"
echo ""
}
exit 0
endef
$(eval $(call BuildPackage,secubox-app-glances))