7bf42ee2f7
CRITICAL BUG FIX: Previous implementation had 5 critical bugs: 1. Returned ALL domains on system instead of per-user domains 2. Early returns prevented fallback methods 3. Find command precedence error 4. Apache configs don't contain user info (design flaw) 5. Silent failures with no output validation New implementation: - USER-SPECIFIC: Only searches /home/$username/ directory - Proper find syntax: \( -name "public_html" -o -name "html" \) - Discovers domains from standard structure: /home/user/domain.com/public_html - No early returns, simple and correct logic - Tested: verified user-specific discovery works correctly Impact: - Standalone servers now correctly map domains to users - Domain discovery no longer corrupts reference database - All domain-dependent tools can now function properly Testing: - Syntax validated: bash -n - Standard structure test: ✓ Finds 3 domains - Multi-user test: ✓ Each user gets only their domains - Find operator precedence: ✓ Fixed with parentheses Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>