- Add mDNS service announcement via avahi-publish for _secubox._tcp - Add REST API endpoints on port 7331 (/api/peers, /api/status, /api/services) - Add node self-registration to ensure local node visible in mesh view - Add UCI defaults for uhttpd P2P API instance and firewall rules - Bump secubox-p2p version to 0.2.0 fix(vhost-manager): Fix uninitialized variable syntax errors - Add 'local' keyword to variable declarations on lines 606, 621, 693 fix(metablogizer,service-registry): Add HAProxy availability fallback - Add haproxy_available() helper to check if HAProxy is running - Gracefully skip HAProxy operations when service unavailable - Store pending HAProxy config for later when service becomes available - Prevent crashes when HAProxy container is stopped Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
11 lines
282 B
Bash
11 lines
282 B
Bash
#!/bin/sh
|
|
# P2P API - Node status endpoint
|
|
# Responds to requests on port 7331
|
|
|
|
echo "Content-Type: application/json"
|
|
echo "Access-Control-Allow-Origin: *"
|
|
echo ""
|
|
|
|
# Get node status from secubox-p2p
|
|
/usr/sbin/secubox-p2p status 2>/dev/null || echo '{"error":"daemon_unavailable"}'
|