From e34958a05f8011d2e7a52df5850d6afb1bb7ed96 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Fri, 3 Oct 2025 15:55:40 +0500 Subject: [PATCH] Move CyberPanel account setup earlier in installation process Account creation now happens immediately after Python version check, before other system operations. This ensures system users are available for subsequent installation steps. --- install/install.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/install/install.py b/install/install.py index 95cbf6af3..8513a6f0b 100644 --- a/install/install.py +++ b/install/install.py @@ -5441,13 +5441,20 @@ def main(): distro = get_distro() checks = preFlightsChecks("/usr/local/lsws/", args.publicip, "/usr/local", cwd, "/usr/local/CyberCP", distro, remotemysql, mysqlhost, mysqldb, mysqluser, mysqlpassword, mysqlport) - + + # Check Python version early + checks.checkPythonVersion() + + # Setup CyberPanel account early before other operations + preFlightsChecks.stdOut("Setting up CyberPanel system account...") + checks.setup_account_cyberpanel() + # Apply OS-specific fixes early in the installation process checks.apply_os_specific_fixes() - + # Ensure MySQL password file is created early to prevent FileNotFoundError checks.ensure_mysql_password_file() - + checks.mountTemp() checks.installQuota() @@ -5463,8 +5470,6 @@ def main(): mysql = args.mysql preFlightsChecks.stdOut("Dobule MySQL instance version will be installed.") - checks.checkPythonVersion() - checks.setup_account_cyberpanel() checks.installCyberPanelRepo() # Note: OS-specific fixes are now applied earlier in the installation process