Commit Graph

5347 Commits

Author SHA1 Message Date
master3395
ff4bf7f017 Install Python MySQL dependencies before running install.py
- Install MariaDB/MySQL development headers (mariadb-devel/mysql-devel)
- Install mysqlclient Python package (provides MySQLdb)
- Support for AlmaLinux 9/10, Rocky Linux, CentOS, RHEL, Ubuntu, Debian
- Verify MySQLdb is available before running installer
- Fixes ModuleNotFoundError: No module named 'MySQLdb'
2026-01-26 22:44:17 +01:00
master3395
b85359587f Add verification for install directory extraction
- Verify install directory exists after extraction
- Show archive contents if extraction fails
- Ensures install/install.py is available for direct execution
2026-01-26 22:39:33 +01:00
master3395
f5f98d0b96 Patch install.py directly to exclude MariaDB-server from dnf commands
- Patches install.py (not just wrapper script) to add --exclude=MariaDB-server*
- Handles both shell commands and Python string commands
- Ensures MariaDB exclude is applied to all installation commands
- Works in conjunction with dnf.conf excludes
2026-01-26 22:38:58 +01:00
master3395
2bd555165a Pass required arguments to install.py for non-interactive installation
- Get server IP address automatically
- Pass publicip as required positional argument
- Set default options (OpenLiteSpeed, Full install, Local MySQL)
- Ensures install.py runs in non-interactive mode
- Fixes issue where old interactive installer was being used
2026-01-26 22:38:32 +01:00
master3395
eb651c5090 Use install/install.py directly instead of cyberpanel_installer.sh wrapper
- install/install.py is the actual installer with our fixes
- cyberpanel_installer.sh is old v2.4.4 wrapper that doesn't support auto-install
- This ensures auto-install mode works and uses our fixed installer
- Falls back to cyberpanel_installer.sh if install.py not found
2026-01-26 22:37:50 +01:00
master3395
6921a97981 Fix Python script syntax for installer patching
- Uses python3 -c instead of heredoc for better compatibility
- Simplified regex patterns for more reliable matching
- Better error handling and fallback to sed
- Properly adds --exclude=MariaDB-server* to dnf/yum install commands
2026-01-26 22:29:33 +01:00
master3395
8617bde2bb Improve installer script patching with Python for better reliability
- Uses Python to properly parse and modify installer script
- Handles multiple patterns for dnf/yum install commands
- Adds --exclude=MariaDB-server* to all relevant commands
- Falls back to sed if Python fails
- More robust than simple sed replacements
2026-01-26 22:29:01 +01:00
master3395
fe1b922ca6 Patch downloaded installer script to exclude MariaDB-server from dnf/yum commands
- Modifies installer script after download but before execution
- Adds --exclude=MariaDB-server* to all dnf/yum install commands
- Prevents MariaDB upgrade attempts in Pre_Install_Required_Components
- Works even if repository is set up and enabled
2026-01-26 22:28:30 +01:00
master3395
2176ba5705 Use Python to properly disable MariaDB repositories with fallback
- Uses Python for more reliable repository file parsing
- Handles MariaDB 12.1 repository sections correctly
- Falls back to renaming repository files if Python fails
- More robust than sed for complex repository file formats
2026-01-26 22:02:44 +01:00
master3395
85e4f93446 Fix sed commands to properly disable MariaDB repositories
- Simplified repository disabling logic
- Ensures enabled=0 is set in all MariaDB repository sections
- Handles cases where enabled line doesn't exist
- More robust file detection using find command
2026-01-26 22:02:14 +01:00
master3395
0fe147e30e Add background monitor to disable MariaDB repositories after they're created
- Creates function to disable MariaDB repository files
- Starts background process to monitor and disable repos as they're created
- Calls disable function right before installer runs
- Stops monitor after installation completes
- Prevents MariaDB upgrade attempts even if repository is set up
2026-01-26 22:01:53 +01:00
master3395
a76463f358 Improve dnf exclude syntax and add yum.conf exclude
- Use MariaDB-server* with wildcard for better matching
- Ensure exclude is in [main] section of dnf.conf
- Also add exclude to yum.conf for compatibility
- Better handling of existing exclude lines
2026-01-26 22:01:12 +01:00
master3395
220bfd40f9 Add dnf exclude for MariaDB-server in cyberpanel.sh before installer runs
- Checks for existing MariaDB 10.x installation
- Adds MariaDB-server to dnf excludes BEFORE Pre_Install_Setup_Repository
- Prevents upgrade attempts in Pre_Install_Required_Components
- Runs early in install_cyberpanel_direct() function
2026-01-26 21:49:46 +01:00
master3395
a508351e9a Call disableMariaDB12RepositoryIfNeeded earlier in main() function
- Called immediately after apply_os_specific_fixes()
- Runs before Pre_Install_Required_Components attempts MariaDB installation
- Ensures dnf exclude is set before any package operations
- Prevents MariaDB upgrade attempts
2026-01-26 21:49:17 +01:00
master3395
8f4bdfbf32 Improve MariaDB repository disabling and add dnf exclude
- Enhanced repository file detection using glob
- Better repository file parsing to disable MariaDB sections
- Always add MariaDB-server to dnf excludes to prevent upgrades
- Handles both existing and new dnf.conf files
- Prevents MariaDB upgrade attempts in Pre_Install_Required_Components
2026-01-26 21:48:45 +01:00
master3395
687ee3ac8b Call disableMariaDB12RepositoryIfNeeded in fix_almalinux9_comprehensive
- Ensures MariaDB 12.1 repository is disabled early in the process
- Called before Pre_Install_Required_Components runs
- Prevents upgrade attempts when MariaDB 10.x is already installed
2026-01-26 21:42:34 +01:00
master3395
8ff0522624 Add function to disable MariaDB 12.1 repository when 10.x is installed
- Prevents upgrade attempts in Pre_Install_Required_Components
- Called early in installation process before repository setup
- Disables MariaDB 12.1 repository files if MariaDB 10.x is detected
- Fixes 'PREIN scriptlet failed' error during installation
2026-01-26 21:42:12 +01:00
master3395
3c9343acb5 Add MariaDB check before repository setup in installMySQL
- Check if MariaDB is already installed before setting up 12.1 repository
- Skip repository setup if MariaDB 10.x is installed to avoid upgrade conflicts
- Prevents 'PREIN scriptlet failed' error when installer tries to upgrade
- Uses existing MariaDB installation if detected
2026-01-26 21:41:39 +01:00
master3395
1c4a3d4fd2 Fix MariaDB installation in fix_almalinux9_comprehensive to check for existing installation
- Check for existing MariaDB before attempting installation
- Prevents upgrade errors when MariaDB 10.x is already installed
- Skips installation if MariaDB is already present
- Fixes 'PREIN scriptlet failed' error during installation
2026-01-26 21:36:06 +01:00
Master3395
d2cb979bf0 Merge pull request #1659 from master3395/v2.5.5-dev
V2.5.5 dev
2026-01-26 21:33:02 +01:00
master3395
64f75cb029 Update cyberpanel.sh to use master3395 fork instead of usmannasir
- Change installer URL from usmannasir/cyberpanel to master3395/cyberpanel
- Update archive URL to use master3395 fork
- This ensures our fixes (bash execution, permission handling) are used
- Fixes issue where old version without fixes was being downloaded
2026-01-26 21:30:49 +01:00
master3395
359d550947 Fix cyberpanel_installer.sh execution permission issues
- Use bash to execute cyberpanel_installer.sh instead of relying on execute bit
- Verify file exists before execution
- Use absolute path to ensure correct file location
- Improve chmod error handling with verification
- Fixes 'Permission denied' error when cyberpanel.sh tries to execute installer
2026-01-26 21:27:16 +01:00
master3395
4f8423f6bf Fix script execution: use bash without exec and ensure proper exit codes
- Replace exec with direct bash execution followed by exit
- This allows cyberpanel.sh to properly execute ./cyberpanel_installer.sh
- Add fallback directories for cd command
- Preserve exit codes from cyberpanel.sh execution
2026-01-26 21:22:18 +01:00
master3395
b678f2a64c Use bash instead of sh to execute cyberpanel.sh
- cyberpanel.sh uses #!/bin/bash so should be executed with bash
- Change to /tmp directory before execution to ensure writable location
- Fixes permission issues when cyberpanel.sh tries to execute other scripts
2026-01-26 21:17:34 +01:00
master3395
84a5a839d3 Use sh to execute cyberpanel.sh to avoid permission issues
- Execute with 'sh' instead of relying on exec permissions
- More reliable in process substitution context
- Handles cases where chmod might not work properly
2026-01-26 21:16:01 +01:00
master3395
12cc48bb6a Fix permission denied error - use absolute path and exec for cyberpanel.sh
- Use absolute path (/tmp/cyberpanel-96375.sh) instead of relative path
- Use exec instead of ./ to execute the script
- Ensures proper permissions and execution in process substitution context
- Clean up script file after execution
2026-01-26 21:14:59 +01:00
master3395
eca38394a3 Simplify install.sh to match stable branch approach
- Remove complex modular architecture that was causing variable persistence issues
- Use simple OS detection like stable branch
- Download cyberpanel.sh directly for v2.5.5-dev branch
- Add disk space checking (10GB minimum)
- Support both yum and dnf for RHEL-based systems
- Fallback to standard cyberpanel.sh if branch-specific download fails
- Much simpler and more reliable approach
2026-01-26 21:13:02 +01:00
master3395
c41b095a71 Always re-capture OS variables in install_dependencies to ensure they persist
- Always call detect_os() and get_os_info() in install_dependencies()
- This ensures variables are fresh and properly captured
- Add confirmation message showing captured values
- Fixes issue where variables were detected but empty when passed to manage_dependencies
2026-01-26 21:11:18 +01:00
master3395
42cdbeba18 Fix OS variable persistence - use eval with get_os_info in install_dependencies
- Remove debug output that wasn't showing
- Use eval with get_os_info() to properly capture OS variables
- Add better error messages showing actual variable values
- Ensure variables are properly exported before calling manage_dependencies
2026-01-26 21:09:46 +01:00
Master3395
9adfca4449 Merge pull request #1658 from master3395/v2.5.5-dev
V2.5.5 dev
2026-01-26 21:02:03 +01:00
master3395
4addca7cfd Ensure file ends with newline 2026-01-26 20:59:45 +01:00
master3395
e1df3180e3 Remove extra fi statement causing syntax error 2026-01-26 20:56:39 +01:00
master3395
e6f6a33973 Fix syntax error (missing fi) and add disk space checking
- Fix missing 'fi' closing the TEMP_DIR check block
- Add check_disk_space() function to verify minimum 10GB available
- Display disk space requirements and available space
- Warn if insufficient space but allow continuation
2026-01-26 20:56:15 +01:00
master3395
3c922b7f62 Fix OS variable capture - use get_os_info() to properly retrieve values
- Use eval with get_os_info() to capture OS variables
- Ensures variables are properly set in current shell scope
- Fixes issue where variables were detected but not available to install_dependencies()
2026-01-26 20:54:07 +01:00
master3395
7ddf3fd9d9 Add debug output to diagnose OS variable passing issue 2026-01-26 20:53:48 +01:00
master3395
69052ce455 Fix set -e causing exit on mkdir failure - disable temporarily for temp dir creation
- Temporarily disable set -e when trying to create temp directories
- Prevents script from exiting when /tmp is full
- Allows fallback to alternative directories or fallback installer
2026-01-26 20:51:16 +01:00
master3395
3debc2580a Handle disk space issues - try multiple temp directories and fallback gracefully
- Try multiple temp directory locations (/tmp, /var/tmp, /root, /root)
- Clean up old temporary directories before creating new ones
- Skip git clone if no temp directory can be created
- Try multiple locations for fallback installer download
- Better error messages for disk space issues
2026-01-26 20:49:18 +01:00
master3395
2a6d05d986 Fix git clone fallback logic - properly handle failed clones
- Use flag-based approach to track git clone success
- Verify repository structure (install.sh and modules/) before using
- Fix fallback execution path
- Support both yum and dnf for package installation
- Better error messages
2026-01-26 20:45:42 +01:00
master3395
4d9d4c66c5 Improve git clone error handling and fallback logic
- Add timeout for git clone (180 seconds)
- Better error messages showing actual git errors
- Verify repository structure before using cloned repo
- Improve fallback installer download with better error handling
- Support both yum and dnf for RHEL-based systems
2026-01-26 20:45:14 +01:00
master3395
236f046f70 Fix OS variable passing to dependency manager - export variables and add safety checks 2026-01-26 20:43:17 +01:00
master3395
a1160fe060 Remove to-do folder and documentation files 2026-01-26 20:40:59 +01:00
master3395
5d272f8e8b Fix v2.5.5-dev installation issues: handle curl execution and MariaDB upgrade attempts
- Fix install.sh to detect curl/wget execution and clone repo before loading modules
- Add MariaDB detection and upgrade attempt logic in install.py
- Attempt MariaDB 12.1 upgrade first, fallback to existing 10.x if blocked
- Add comprehensive error handling and logging for upgrade attempts
- Update documentation with fix details
2026-01-26 20:39:25 +01:00
master3395
0991a21c19 Fix dashboard insights 500s: FTPUsers filter, session/ACL safety, /proc hardening
- FTPUsers: use domain__domain__in (FK to Websites) not domain__in
- Session: use session.get('userID'), return JSON when missing
- ACL: use currentACL.get('admin',0) to avoid KeyError
- /proc: resilient parsing for net/dev, diskstats, stat
- Log errors via CyberCPLogFileWriter; generic user-facing messages
- Prevents intermittent 500s that zero out insights (Users, Sites, etc.)
2026-01-26 20:01:34 +01:00
Master3395
2bcb658ce9 Merge pull request #1657 from master3395/v2.5.5-dev
V2.5.5 dev
2026-01-26 17:47:17 +01:00
master3395
3474ae18f3 Fix plugin count discrepancy and remove duplicate view toggle
- Fixed installed plugin count to correctly show all 10 installed plugins
- Added filesystem verification to ensure accurate plugin counting
- Fixed duplicate view-toggle navigation row (removed second row)
- Added installed/active count display in page header
- Improved plugin installed status detection logic
- Enhanced debug logging for plugin count discrepancies
2026-01-26 17:45:36 +01:00
master3395
da746d900f fix(plugins): Add total_installed and total_active to context 2026-01-26 03:48:13 +01:00
master3395
91764d3e4f feat(plugins): Add installed and active plugin statistics to Installed Plugins page
- Calculate total installed plugins count
- Calculate total active/enabled plugins count
- Display statistics in page header with icons
- Shows 'Installed: X' and 'Active: Y' counts
- Statistics only shown when plugins are installed
- Improves visibility of plugin status at a glance
2026-01-26 03:47:41 +01:00
master3395
8d09d75ff8 fix(plugins): Add missing outer except block in fetch_plugin_store 2026-01-26 03:45:29 +01:00
master3395
63f4f53eee fix(plugins): Fix indentation in fetch_plugin_store - final fix 2026-01-26 03:44:59 +01:00
master3395
e3b5123480 fix(plugins): Fix indentation error in fetch_plugin_store exception handler
- Fix except block indentation to match try block
- Add error handling for enrichment in stale cache fallback
- Ensures proper exception handling structure
2026-01-26 03:44:34 +01:00