mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 08:16:11 +01:00
bug fix: duplicate selectors
This commit is contained in:
@@ -127,7 +127,6 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
FNULL = open(os.devnull, 'w')
|
FNULL = open(os.devnull, 'w')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
finalPath = ''
|
finalPath = ''
|
||||||
self.permPath = ''
|
self.permPath = ''
|
||||||
|
|
||||||
@@ -207,9 +206,6 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
statusFile.writelines('Downloading Mautic Core,30')
|
statusFile.writelines('Downloading Mautic Core,30')
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
|
|
||||||
#command = "wget https://github.com/mautic/mautic/releases/download/%s/%s.zip" % (
|
|
||||||
#ApplicationInstaller.MauticVersion, ApplicationInstaller.MauticVersion)
|
|
||||||
|
|
||||||
### replace command with composer install
|
### replace command with composer install
|
||||||
command = f'{phpPath} /usr/bin/composer create-project mautic/recommended-project:^4 {finalPath}'
|
command = f'{phpPath} /usr/bin/composer create-project mautic/recommended-project:^4 {finalPath}'
|
||||||
ProcessUtilities.outputExecutioner(command, externalApp, None)
|
ProcessUtilities.outputExecutioner(command, externalApp, None)
|
||||||
@@ -218,9 +214,6 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
statusFile.writelines('Extracting Mautic Core,50')
|
statusFile.writelines('Extracting Mautic Core,50')
|
||||||
statusFile.close()
|
statusFile.close()
|
||||||
|
|
||||||
### replace command with composer install
|
|
||||||
#command = "unzip %s.zip" % (ApplicationInstaller.MauticVersion)
|
|
||||||
#ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath)
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
@@ -235,49 +228,6 @@ class ApplicationInstaller(multi.Thread):
|
|||||||
finalURL = domainName
|
finalURL = domainName
|
||||||
|
|
||||||
|
|
||||||
# ACLManager.CreateSecureDir()
|
|
||||||
# localDB = '%s/%s' % ('/usr/local/CyberCP/tmp', str(randint(1000, 9999)))
|
|
||||||
#
|
|
||||||
# localDBContent = """<?php
|
|
||||||
# // Example local.php to test install (to adapt of course)
|
|
||||||
# $parameters = array(
|
|
||||||
# // Do not set db_driver and mailer_from_name as they are used to assume Mautic is installed
|
|
||||||
# 'db_host' => 'localhost',
|
|
||||||
# 'db_table_prefix' => null,
|
|
||||||
# 'db_port' => 3306,
|
|
||||||
# 'db_name' => '%s',
|
|
||||||
# 'db_user' => '%s',
|
|
||||||
# 'db_password' => '%s',
|
|
||||||
# 'db_backup_tables' => true,
|
|
||||||
# 'db_backup_prefix' => 'bak_',
|
|
||||||
# 'admin_email' => '%s',
|
|
||||||
# 'admin_password' => '%s',
|
|
||||||
# 'mailer_transport' => null,
|
|
||||||
# 'mailer_host' => null,
|
|
||||||
# 'mailer_port' => null,
|
|
||||||
# 'mailer_user' => null,
|
|
||||||
# 'mailer_password' => null,
|
|
||||||
# 'mailer_api_key' => null,
|
|
||||||
# 'mailer_encryption' => null,
|
|
||||||
# 'mailer_auth_mode' => null,
|
|
||||||
# );""" % (dbName, dbUser, dbPassword, email, password)
|
|
||||||
#
|
|
||||||
# writeToFile = open(localDB, 'w')
|
|
||||||
# writeToFile.write(localDBContent)
|
|
||||||
# writeToFile.close()
|
|
||||||
|
|
||||||
#command = 'rm -rf %s/app/config/local.php' % (finalPath)
|
|
||||||
#ProcessUtilities.executioner(command, externalApp)
|
|
||||||
|
|
||||||
#command = 'chown %s:%s %s' % (externalApp, externalApp, localDB)
|
|
||||||
#ProcessUtilities.executioner(command)
|
|
||||||
|
|
||||||
#command = 'cp %s %s/app/config/local.php' % (localDB, finalPath)
|
|
||||||
#ProcessUtilities.executioner(command, externalApp)
|
|
||||||
|
|
||||||
### replace install command with comspoer soo
|
|
||||||
#command = f"{phpPath} bin/console mautic:install http://%s -f" % (finalURL)
|
|
||||||
|
|
||||||
command = f"{phpPath} bin/console mautic:install --db_host='localhost' --db_name='{dbName}' --db_user='{dbUser}' --db_password='{dbPassword}' --admin_username='{username}' --admin_email='{email}' --admin_password='{password}' --db_port='3306' http://{finalURL} -f"
|
command = f"{phpPath} bin/console mautic:install --db_host='localhost' --db_name='{dbName}' --db_user='{dbUser}' --db_password='{dbPassword}' --admin_username='{username}' --admin_email='{email}' --admin_password='{password}' --db_port='3306' http://{finalURL} -f"
|
||||||
|
|
||||||
result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath)
|
result = ProcessUtilities.outputExecutioner(command, externalApp, None, finalPath)
|
||||||
|
|||||||
@@ -1402,6 +1402,10 @@ class MailServerManagerUtils(multi.Thread):
|
|||||||
for items in postFixLines:
|
for items in postFixLines:
|
||||||
if items.find('myhostname') > -1 and items[0] != '#':
|
if items.find('myhostname') > -1 and items[0] != '#':
|
||||||
self.mailHostName = items.split('=')[1].strip(' ')
|
self.mailHostName = items.split('=')[1].strip(' ')
|
||||||
|
|
||||||
|
if os.path.exists(ProcessUtilities.debugPath):
|
||||||
|
logging.CyberCPLogFileWriter.writeToFile(f'Mail server SSL is issued with value: {self.mailHostName}')
|
||||||
|
|
||||||
self.MailSSL = 1
|
self.MailSSL = 1
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
self.MailSSL = 0
|
self.MailSSL = 0
|
||||||
|
|||||||
@@ -2145,6 +2145,8 @@ CREATE TABLE `websiteFunctions_backupsv2` (`id` integer AUTO_INCREMENT NOT NULL
|
|||||||
def installLSCPD(branch):
|
def installLSCPD(branch):
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
if branch.find('SoftUpgrade') == -1:
|
||||||
|
|
||||||
Upgrade.stdOut("Starting LSCPD installation..")
|
Upgrade.stdOut("Starting LSCPD installation..")
|
||||||
|
|
||||||
cwd = os.getcwd()
|
cwd = os.getcwd()
|
||||||
@@ -2907,8 +2909,6 @@ vmail
|
|||||||
# Upgrade.stdOut("Upgrades are currently disabled")
|
# Upgrade.stdOut("Upgrades are currently disabled")
|
||||||
# return 0
|
# return 0
|
||||||
|
|
||||||
if branch.find('SoftUpgrade') == -1:
|
|
||||||
|
|
||||||
if os.path.exists(Upgrade.CentOSPath) or os.path.exists(Upgrade.openEulerPath):
|
if os.path.exists(Upgrade.CentOSPath) or os.path.exists(Upgrade.openEulerPath):
|
||||||
command = 'yum list installed'
|
command = 'yum list installed'
|
||||||
Upgrade.installedOutput = subprocess.check_output(shlex.split(command)).decode()
|
Upgrade.installedOutput = subprocess.check_output(shlex.split(command)).decode()
|
||||||
@@ -2931,24 +2931,26 @@ vmail
|
|||||||
# os.remove('/usr/local/lsws/conf/httpd_config.xml')
|
# os.remove('/usr/local/lsws/conf/httpd_config.xml')
|
||||||
# shutil.copy('httpd_config.xml', '/usr/local/lsws/conf/httpd_config.xml')
|
# shutil.copy('httpd_config.xml', '/usr/local/lsws/conf/httpd_config.xml')
|
||||||
|
|
||||||
postfixPath = '/home/cyberpanel/postfix'
|
|
||||||
pdns = '/home/cyberpanel/pdns'
|
|
||||||
pureftpd = '/home/cyberpanel/ftp'
|
|
||||||
|
|
||||||
Upgrade.updateRepoURL()
|
Upgrade.updateRepoURL()
|
||||||
|
|
||||||
os.chdir("/usr/local")
|
os.chdir("/usr/local")
|
||||||
|
|
||||||
|
if os.path.exists(Upgrade.CentOSPath) or os.path.exists(Upgrade.openEulerPath):
|
||||||
command = 'yum remove yum-plugin-priorities -y'
|
command = 'yum remove yum-plugin-priorities -y'
|
||||||
Upgrade.executioner(command, 'remove yum-plugin-priorities', 0)
|
Upgrade.executioner(command, 'remove yum-plugin-priorities', 0)
|
||||||
|
|
||||||
## Current Version
|
## Current Version
|
||||||
|
|
||||||
|
|
||||||
|
### if this is a soft upgrade from front end do not stop lscpd, as lscpd is controlling the front end
|
||||||
|
|
||||||
|
if branch.find('SoftUpgrade') == -1:
|
||||||
command = "systemctl stop lscpd"
|
command = "systemctl stop lscpd"
|
||||||
Upgrade.executioner(command, 'stop lscpd', 0)
|
Upgrade.executioner(command, 'stop lscpd', 0)
|
||||||
|
|
||||||
Upgrade.fixSudoers()
|
Upgrade.fixSudoers()
|
||||||
Upgrade.mountTemp()
|
#Upgrade.mountTemp()
|
||||||
Upgrade.dockerUsers()
|
Upgrade.dockerUsers()
|
||||||
Upgrade.setupComposer()
|
Upgrade.setupComposer()
|
||||||
|
|
||||||
@@ -3066,9 +3068,6 @@ vmail
|
|||||||
Upgrade.executioner(command, command, 1)
|
Upgrade.executioner(command, command, 1)
|
||||||
|
|
||||||
Upgrade.stdOut("Upgrade Completed.")
|
Upgrade.stdOut("Upgrade Completed.")
|
||||||
else:
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -119,27 +119,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-hide="installationDetailsForm" class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<select ng-model="websiteOwner" class="form-control">
|
|
||||||
{% for items in owernList %}
|
|
||||||
<option>{{ items }}</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div ng-hide="installationDetailsForm" class="form-group">
|
|
||||||
<label class="col-sm-3 control-label">{% trans "Select Package" %}</label>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<select ng-model="packageForWebsite" class="form-control">
|
|
||||||
{% for items in packageList %}
|
|
||||||
<option>{{ items }}</option>
|
|
||||||
{% endfor %}
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div ng-hide="installationDetailsForm" class="form-group">
|
<div ng-hide="installationDetailsForm" class="form-group">
|
||||||
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
|
<label class="col-sm-3 control-label">{% trans "Select Owner" %}</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user