From b07d895becb5487ba83138329d58e2974caa7cc7 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Fri, 19 Sep 2025 12:06:13 +0500 Subject: [PATCH] debian 12 --- install/install.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/install/install.py b/install/install.py index 7199d1dc9..b16c9504a 100644 --- a/install/install.py +++ b/install/install.py @@ -2886,7 +2886,14 @@ def main(): # Now that database is created, run Django migrations preFlightsChecks.stdOut("Running Django migrations...") - os.chdir("/usr/local/CyberPanel") + # Check which directory exists (installation may be at different stages) + if os.path.exists("/usr/local/CyberCP"): + os.chdir("/usr/local/CyberCP") + elif os.path.exists("/usr/local/cyberpanel"): + os.chdir("/usr/local/cyberpanel") + else: + preFlightsChecks.stdOut("ERROR: Neither /usr/local/CyberCP nor /usr/local/cyberpanel exists!") + sys.exit(1) # Create fresh migrations for all apps command = "/usr/local/CyberPanel/bin/python manage.py makemigrations"