Files
bzzz/install-service.sh
anthonyrawlins d96c931a29 Resolve import cycles and migrate to chorus.services module path
This comprehensive refactoring addresses critical architectural issues:

IMPORT CYCLE RESOLUTION:
• pkg/crypto ↔ pkg/slurp/roles: Created pkg/security/access_levels.go
• pkg/ucxl → pkg/dht: Created pkg/storage/interfaces.go
• pkg/slurp/leader → pkg/election → pkg/slurp/storage: Moved types to pkg/election/interfaces.go

MODULE PATH MIGRATION:
• Changed from github.com/anthonyrawlins/bzzz to chorus.services/bzzz
• Updated all import statements across 115+ files
• Maintains compatibility while removing personal GitHub account dependency

TYPE SYSTEM IMPROVEMENTS:
• Resolved duplicate type declarations in crypto package
• Added missing type definitions (RoleStatus, TimeRestrictions, KeyStatus, KeyRotationResult)
• Proper interface segregation to prevent future cycles

ARCHITECTURAL BENEFITS:
• Build now progresses past structural issues to normal dependency resolution
• Cleaner separation of concerns between packages
• Eliminates circular dependencies that prevented compilation
• Establishes foundation for scalable codebase growth

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-17 10:04:25 +10:00

53 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# BZZZ Service Installation Script
# Installs BZZZ as a systemd service
set -e
echo "🐝 Installing BZZZ P2P Task Coordination Service..."
# Check if running as root or with sudo
if [ "$EUID" -ne 0 ]; then
echo "❌ This script must be run as root or with sudo"
exit 1
fi
# Define paths
BZZZ_DIR="$(pwd)"
SERVICE_FILE="$BZZZ_DIR/bzzz.service"
SYSTEMD_DIR="/etc/systemd/system"
# Check if BZZZ binary exists
if [ ! -f "$BZZZ_DIR/bzzz" ]; then
echo "❌ BZZZ binary not found at $BZZZ_DIR/bzzz"
exit 1
fi
# Make binary executable
chmod +x "$BZZZ_DIR/bzzz"
echo "✅ Made BZZZ binary executable"
# Copy service file to systemd directory
cp "$SERVICE_FILE" "$SYSTEMD_DIR/bzzz.service"
echo "✅ Copied service file to $SYSTEMD_DIR/bzzz.service"
# Set proper permissions
chmod 644 "$SYSTEMD_DIR/bzzz.service"
echo "✅ Set service file permissions"
# Reload systemd daemon
systemctl daemon-reload
echo "✅ Reloaded systemd daemon"
# Enable service to start on boot
systemctl enable bzzz.service
echo "✅ Enabled BZZZ service for auto-start"
# Start the service
systemctl start bzzz.service
echo "✅ Started BZZZ service"
echo ""
echo "🎉 BZZZ P2P Task Coordination Service installed successfully!"