mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-06 15:42:06 +01:00
debian 12
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user