secubox-openwrt/package/secubox/secubox-app-haproxy/files/etc/init.d/haproxy
CyberMind-FR f3fd676ad1 feat(haproxy): Add HAProxy load balancer packages for OpenWrt
- Add secubox-app-haproxy: LXC-containerized HAProxy service
  - Alpine Linux container with HAProxy
  - Multi-certificate SSL/TLS termination with SNI routing
  - ACME/Let's Encrypt auto-renewal
  - Virtual hosts management
  - Backend health checks and load balancing

- Add luci-app-haproxy: Full LuCI web interface
  - Overview dashboard with service status
  - Virtual hosts management with SSL options
  - Backends and servers configuration
  - SSL certificate management (ACME + import)
  - ACLs and URL-based routing rules
  - Statistics dashboard and logs
  - Settings for ports, timeouts, ACME

- Update luci-app-secubox-portal:
  - Add Services category with HAProxy, HexoJS, PicoBrew,
    Tor Shield, Jellyfin, Home Assistant, AdGuard Home, Nextcloud
  - Make portal dynamic - only shows installed apps
  - Add empty state UI for sections with no apps
  - Remove 404 errors for uninstalled apps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:09:32 +01:00

39 lines
653 B
Bash

#!/bin/sh /etc/rc.common
# SecuBox HAProxy Service
# Copyright (C) 2025 CyberMind.fr
START=90
STOP=10
USE_PROCD=1
NAME="haproxy"
PROG="/usr/sbin/haproxyctl"
start_service() {
local enabled
config_load haproxy
config_get enabled main enabled '0'
[ "$enabled" = "1" ] || return 0
procd_open_instance
procd_set_param command "$PROG" service-run
procd_set_param respawn 3600 5 0
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param pidfile /var/run/haproxy-lxc.pid
procd_close_instance
}
stop_service() {
"$PROG" service-stop
}
reload_service() {
"$PROG" reload
}
service_triggers() {
procd_add_reload_trigger "haproxy"
}