debian 12

This commit is contained in:
usmannasir
2025-09-19 11:32:35 +05:00
parent 7718a68df7
commit 27f8bf65a9

View File

@@ -657,17 +657,7 @@ password="%s"
# self.setupVirtualEnv(self.distro)
### Applying migrations
os.chdir("/usr/local/CyberCP")
# Create fresh migrations for all apps
command = "/usr/local/CyberPanel/bin/python manage.py makemigrations"
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
# Apply all migrations
command = "/usr/local/CyberPanel/bin/python manage.py migrate"
preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR)
### Database migrations will be handled after database creation
if not os.path.exists("/usr/local/CyberCP/public"):
os.mkdir("/usr/local/CyberCP/public")
@@ -2894,6 +2884,18 @@ def main():
installCyberPanel.Main(cwd, mysql, distro, ent, serial, port, args.ftp, args.powerdns, args.publicip,
remotemysql, mysqlhost, mysqldb, mysqluser, mysqlpassword, mysqlport)
# Now that database is created, run Django migrations
preFlightsChecks.stdOut("Running Django migrations...")
os.chdir("/usr/local/CyberCP")
# Create fresh migrations for all apps
command = "/usr/local/CyberPanel/bin/python manage.py makemigrations"
preFlightsChecks.call(command, distro, command, command, 1, 1, os.EX_OSERR)
# Apply all migrations
command = "/usr/local/CyberPanel/bin/python manage.py migrate"
preFlightsChecks.call(command, distro, command, command, 1, 1, os.EX_OSERR)
checks.setupPHPAndComposer()
checks.fix_selinux_issue()
checks.install_psmisc()