mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
bug fix: create directories if dont exist
This commit is contained in:
@@ -1338,7 +1338,8 @@ autocreate_system_folders = On
|
||||
command = 'mv %s %s' % (includeFileOldPath, includeFileNewPath)
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
command = "sed -i 's|autocreate_system_folders = Off|autocreate_system_folders = On|g' %s" % (labsPath)
|
||||
#command = "sed -i 's|autocreate_system_folders = Off|autocreate_system_folders = On|g' %s" % (labsPath)
|
||||
command = "sed -i 's|verify_certificate = On|verify_certificate = Off|g' %s" % (labsPath)
|
||||
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
except BaseException as msg:
|
||||
|
||||
@@ -66,6 +66,8 @@ class mailUtilities:
|
||||
command = 'chown -R lscpd:lscpd /usr/local/lscp/cyberpanel/rainloop/data/'
|
||||
ProcessUtilities.normalExecutioner(command)
|
||||
|
||||
|
||||
|
||||
@staticmethod
|
||||
def createEmailAccount(domain, userName, password, restore = None):
|
||||
try:
|
||||
@@ -167,6 +169,22 @@ class mailUtilities:
|
||||
emailLimits = EmailLimits(email=emailAcct)
|
||||
emailLimits.save()
|
||||
|
||||
### Create email folders manually if they dont exist
|
||||
|
||||
command = f"mkdir '/home/vmail/{domain}/{userName}/Maildir/.Archive' " \
|
||||
f"'/home/vmail/{domain}/{userName}/Maildir/.Deleted Items' " \
|
||||
f"'/home/vmail/{domain}/{userName}/Maildir/.Drafts' " \
|
||||
f"'/home/vmail/{domain}/{userName}/Maildir/.Sent' " \
|
||||
f"'/home/vmail/{domain}/{userName}/Maildir/.Junk E-mail'"
|
||||
ProcessUtilities.executioner(command, 'vmail')
|
||||
|
||||
command = f"chmod 700 '/home/vmail/{domain}/{userName}/Maildir/.Archive' " \
|
||||
f"'/home/vmail/{domain}/{userName}/Maildir/.Deleted Items' " \
|
||||
f"'/home/vmail/{domain}/{userName}/Maildir/.Drafts' " \
|
||||
f"'/home/vmail/{domain}/{userName}/Maildir/.Sent' " \
|
||||
f"'/home/vmail/{domain}/{userName}/Maildir/.Junk E-mail'"
|
||||
ProcessUtilities.executioner(command, 'vmail')
|
||||
|
||||
print("1,None")
|
||||
return 1,"None"
|
||||
|
||||
|
||||
@@ -533,6 +533,12 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
|
||||
|
||||
## take care of auto create folders
|
||||
|
||||
## Disable local cert verification
|
||||
|
||||
command = "sed -i 's|verify_certificate = On|verify_certificate = Off|g' %s" % (labsPath)
|
||||
Upgrade.executioner(command, 'verify certificate', 0)
|
||||
|
||||
|
||||
# labsData = open(labsPath, 'r').read()
|
||||
# labsDataLines = open(labsPath, 'r').readlines()
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user