3471ee3dca
Core Infrastructure Added: - lib/plesk-helpers.sh: 30+ Plesk-specific helper functions - Domain discovery (list, docroot, logdir, access/error logs) - User/subscription management - Database discovery - PHP version detection (/opt/plesk/php/) - PHP-FPM pool discovery - Configuration file locations - Mail functions - Service management - Version detection with log structure handling - lib/domain-discovery.sh: Unified control panel abstraction - Consistent API across cPanel, Plesk, InterWorx, standalone - list_all_domains() - works on any panel - get_domain_docroot() - panel-agnostic document root - get_domain_logdir() - panel-agnostic log discovery - get_domain_access_log() - access log paths - get_domain_error_log() - error log paths - get_all_log_files() - all logs across all domains - get_domain_owner() - domain owner/user - list_all_users() - user enumeration - get_domain_fpm_socket() - PHP-FPM pool sockets - get_domain_databases() - database discovery - domain_exists() - existence checks Documentation: - PLESK_REFERENCE.md: Complete Plesk architecture reference - Directory structure mapping - Log file locations (current & future versions) - PHP-FPM pool locations - Configuration file paths - Plesk CLI command reference - Key differences from cPanel - Subdomain handling differences - PLESK_SUPPORT_SUMMARY.md: Implementation summary - All functions documented - Usage examples - Migration guide for existing modules - Version compatibility notes - Testing checklist System Detection Enhanced: - lib/system-detect.sh: - Improved Plesk detection with version-aware log paths - Auto-sources plesk-helpers.sh when Plesk detected - Added /opt/plesk/php/ scanning for PHP versions - Sets SYS_USER_HOME_BASE=/var/www/vhosts for Plesk Email Menu Added: - launcher.sh: New Email Troubleshooting menu category - 9 email diagnostic/maintenance tools (placeholders) - Deliverability test, queue inspector, SMTP test - SPF/DKIM/DMARC check, blacklist check - Mail log analyzer, queue flush - Mailbox cleanup, size reports Plesk Architecture Support: - /var/www/vhosts/ base directory structure - system/DOMAIN/logs/ for Plesk <18.0.50 - DOMAIN/logs/ for Plesk 18.0.50+ - Automatic version detection - Subdomain separate directory handling - /opt/plesk/php/X.Y/ PHP version detection - /var/www/vhosts/system/DOMAIN/php-fpm.sock pools - /var/www/vhosts/system/DOMAIN/conf/ configs Fallback Mechanisms: - All functions work with or without Plesk CLI - Directory scanning fallbacks - MySQL direct query fallbacks - Path inference from standard locations Status: Core infrastructure complete, ready for module integration Next: Test on actual Plesk server, update existing modules Ref: system_map.tsv analysis from Plesk production system