Commit Graph

2 Commits

Author SHA1 Message Date
cschantz c2cb489f0a REFACTOR: Class D modules - Panel-specific conditionals
Completed Class D refactoring (panel-specific modules).

MODULES REFACTORED:

1. enable-cphulk.sh (ALREADY COMPLIANT)
   - Already checks SYS_CONTROL_PANEL at startup (line 35)
   - Exits gracefully if not cPanel
   - Shows detected panel in error message
   - All whmapi1 calls only reachable after panel check
   - No changes needed 

2. system-health-check.sh (ENHANCED)
   - Already had conditional checks for CPHulk (lines 606, 1706)
   - Enhanced control panel version detection (line 940-947)
   - Now uses SYS_CONTROL_PANEL_VERSION from system-detect.sh
   - Supports cPanel, Plesk, InterWorx version reporting
   - All panel-specific features properly gated

ARCHITECTURE COMPLIANCE:
 Panel-specific features wrapped in conditionals
 Graceful degradation when feature unavailable
 Clear error messages mentioning panel requirements
 Uses system-detect.sh variables
 All syntax validated

VERIFIED COMPLIANT:
 mysql-query-analyzer.sh - Already uses get_user_databases()

TESTING:
- Both modules passed `bash -n` syntax check
- enable-cphulk.sh will exit gracefully on non-cPanel
- system-health-check.sh will skip cPanel features on other panels

PROGRESS UPDATE:
- Class A:  7 modules (no changes needed)
- Class B:  6/6 modules COMPLETE
- Class C:  3/6 modules (bot-analyzer, malware-scanner, mysql-query)
- Class D:  2/2 modules COMPLETE
- Acronis:  13 modules (no changes needed)

Total: 31/38 modules architecture-compliant!

Remaining: 7 modules (website error analyzers + WordPress)
2025-11-19 20:08:31 -05:00
cschantz a51d968185 Initial commit: Server Management Toolkit v2.0
- Complete security menu restructure (3-mode: Analysis/Actions/Live)
- Intelligent cPHulk enablement with CSF whitelist import
- Live network security monitoring dashboard
- Multi-source threat detection and classification
- 50+ organized security tools across 4-level menu hierarchy
- System health diagnostics with cPanel/WHM integration
- Reference database for cross-module intelligence sharing
2025-11-03 18:21:40 -05:00