mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-29 12:34:38 +00:00
Includes all package APIs with public dashboard endpoints: - secubox-system: System Hub with /info, /resources, /security - secubox-crowdsec: CrowdSec dashboard with /status, /hub, /metrics, actions - secubox-wireguard: WireGuard VPN with /interfaces, /peers, start/stop - secubox-netdata: Monitoring with /stats, /processes, /alerts Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
28 lines
789 B
Bash
Executable File
28 lines
789 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Builder un package et l'ajouter au repo local
|
|
set -euo pipefail
|
|
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
REPO_DIR="$(dirname "$SCRIPT_DIR")"
|
|
|
|
PKG="${1:-}"
|
|
SUITE="${2:-bookworm}"
|
|
ARCH="${3:-$(dpkg --print-architecture)}"
|
|
|
|
[[ -z "$PKG" ]] && { echo "Usage: $0 <package-name> [suite] [arch]"; exit 1; }
|
|
|
|
PKG_DIR="${REPO_DIR}/packages/${PKG}"
|
|
[[ -d "$PKG_DIR" ]] || { echo "Package not found: $PKG_DIR"; exit 1; }
|
|
|
|
cd "$PKG_DIR"
|
|
|
|
if [[ "$ARCH" == "arm64" ]] && [[ "$(uname -m)" != "aarch64" ]]; then
|
|
dpkg-buildpackage -a arm64 --host-arch arm64 -us -uc -b
|
|
else
|
|
dpkg-buildpackage -us -uc -b
|
|
fi
|
|
|
|
# Find generated .deb
|
|
cd "${REPO_DIR}/packages"
|
|
DEB=$(ls -t ${PKG}_*.deb 2>/dev/null | head -1)
|
|
[[ -n "$DEB" ]] && bash "${SCRIPT_DIR}/local-repo-add.sh" "$SUITE" "$DEB"
|