mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 00:06:09 +01:00
Optimization to interface and improved installation process!
This commit is contained in:
@@ -1181,12 +1181,23 @@ def installWordPress(domainName,finalPath,virtualHostUser,dbName,dbUser,dbPasswo
|
||||
if not os.path.exists(finalPath):
|
||||
os.makedirs(finalPath)
|
||||
|
||||
if not os.listdir(finalPath):
|
||||
## checking for directories/files
|
||||
|
||||
dirFiles = os.listdir(finalPath)
|
||||
|
||||
if len(dirFiles) == 1:
|
||||
if dirFiles[0] == ".well-known":
|
||||
pass
|
||||
else:
|
||||
print "0,Target directory should be empty before installation, otherwise data loss could occur."
|
||||
return
|
||||
elif len(dirFiles) == 0:
|
||||
pass
|
||||
else:
|
||||
print "0,Target directory should be empty before installation, otherwise data loss could occur."
|
||||
return
|
||||
|
||||
|
||||
## Get wordpress
|
||||
|
||||
|
||||
@@ -1297,7 +1308,13 @@ def installJoomla(domainName,finalPath,virtualHostUser,dbName,dbUser,dbPassword,
|
||||
if not os.path.exists(finalPath):
|
||||
os.makedirs(finalPath)
|
||||
|
||||
if not os.listdir(finalPath):
|
||||
if len(dirFiles) == 1:
|
||||
if dirFiles[0] == ".well-known":
|
||||
pass
|
||||
else:
|
||||
print "0,Target directory should be empty before installation, otherwise data loss could occur."
|
||||
return
|
||||
elif len(dirFiles) == 0:
|
||||
pass
|
||||
else:
|
||||
print "0,Target directory should be empty before installation, otherwise data loss could occur."
|
||||
|
||||
Reference in New Issue
Block a user