Commit Graph

5353 Commits

Author SHA1 Message Date
master3395
de21c03fc7 Fix MariaDB compat, mysql path, and OpenLiteSpeed binary install
MariaDB-server-compat:
- Remove MariaDB-server-compat* in main() before any MariaDB install
- Use dnf remove then rpm -e --nodeps loop in main(), installMySQL, fix_almalinux9
- Prevents transaction conflicts when installing MariaDB 10.11

mysql command not found:
- install_utils.call: detect mysql/mariadb commands, use shell=True and full path
- Replace leading mysql/mariadb with /usr/bin/mariadb or /usr/bin/mysql
- Fixes FileNotFoundError when changeMYSQLRootPassword runs

OpenLiteSpeed:
- Create /usr/local/lsws and /usr/local/lsws/bin before installing custom binary
- Fixes 'No such file or directory: /usr/local/lsws/bin/openlitespeed'
2026-01-26 23:21:53 +01:00
master3395
99b24f853a Fix mysql command not found error in install_utils.call
- Detect mysql/mariadb commands and find binary path automatically
- Replace mysql/mariadb with full path (/usr/bin/mysql or /usr/bin/mariadb)
- Use shell=True for mysql commands to handle complex SQL properly
- Fixes FileNotFoundError when executing mysql commands
- Works with both mysql and mariadb binaries
2026-01-26 22:58:56 +01:00
master3395
a28c4287bf Remove conflicting MariaDB-server-compat packages before installation
- Remove MariaDB-server-compat* packages that conflict with MariaDB 10.11
- Fixes transaction test errors when installing MariaDB 10.11
- Removes compat packages from previous MariaDB 12.1 installation attempts
- Ensures clean MariaDB 10.11 installation without conflicts
- Also remove sudo from curl command (not needed when running as root)
2026-01-26 22:58:06 +01:00
master3395
e271edd1b2 Fix mariadb-devel installation when MariaDB-server is excluded
- Temporarily adjust dnf exclude to allow mariadb-devel installation
- Only exclude MariaDB-server, not development packages
- Ensures mariadb-devel can be installed even when server is excluded
- Critical for Python mysqlclient package compilation
2026-01-26 22:48:53 +01:00
master3395
49df4ae9ac Improve Python MySQL dependency installation with better error handling
- Remove silent redirects to show actual errors
- Add explicit success/failure messages
- Show pip installation output for debugging
- Better OS detection with fallback
- Verify MySQLdb availability with version check
- Add diagnostic output if installation fails
- Ensures dependencies are installed before install.py runs
2026-01-26 22:48:28 +01:00
master3395
cc30e8aed8 Add AlmaLinux 10 support to OS detection
- Detect AlmaLinux 10 in detect_os() function
- Treat AlmaLinux 10 same as AlmaLinux 9 for package installation
- Update supported OS list to include AlmaLinux 10
- Ensures installer works on AlmaLinux 9.x and 10.x
2026-01-26 22:44:51 +01:00
master3395
e2931ad53e 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
9006b1bb6b 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
615e148467 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
703ea3b1bb 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
368994ab13 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
730cbe6879 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
cb2ec327ce 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
70a4182962 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
09800e12fc 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
e71a097cf9 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
5a448acd64 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
cc62657026 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
e2033b1f34 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
ba43d72649 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
65af295f0e 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
98ec16f714 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
bd570c563b 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
273e3ecdc3 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
9ba66d8c04 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
4f09cefbba Merge pull request #1659 from master3395/v2.5.5-dev
V2.5.5 dev
2026-01-26 21:33:02 +01:00
master3395
c13d23ad58 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
4f323d7a8d 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
a71c91b99a 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
5ee18f1cc3 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
4b99e46bfd 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
6161081b98 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
87a38b5a1b 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
19f1ca62cb 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
734a8ed6e8 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
222f671801 Merge pull request #1658 from master3395/v2.5.5-dev
V2.5.5 dev
2026-01-26 21:02:03 +01:00
master3395
073e6a0b11 Ensure file ends with newline 2026-01-26 20:59:45 +01:00
master3395
0e7cb5b798 Remove extra fi statement causing syntax error 2026-01-26 20:56:39 +01:00
master3395
20c51e9edb 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
f928578abb 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
1351de7590 Add debug output to diagnose OS variable passing issue 2026-01-26 20:53:48 +01:00
master3395
872704635f 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
be80a9e873 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
b6d64f99c6 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
1db7ebfeed 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
6b46cbafcd Fix OS variable passing to dependency manager - export variables and add safety checks 2026-01-26 20:43:17 +01:00
master3395
399cb06f50 Remove to-do folder and documentation files 2026-01-26 20:40:59 +01:00
master3395
17421b6dfe 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
35a4e90698 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
037b1ea6cf Merge pull request #1657 from master3395/v2.5.5-dev
V2.5.5 dev
2026-01-26 17:47:17 +01:00