From 28082f5b81a25af5a2ccf6ef736754b145bada2b Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Thu, 23 Jun 2022 13:00:13 +0500 Subject: [PATCH 1/7] debug false --- CyberCP/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CyberCP/settings.py b/CyberCP/settings.py index f20c69b48..ef8b84ed8 100755 --- a/CyberCP/settings.py +++ b/CyberCP/settings.py @@ -24,7 +24,7 @@ BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = 'xr%j*p!*$0d%(-(e%@-*hyoz4$f%y77coq0u)6pwmjg4)q&19f' # SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True +DEBUG = False ALLOWED_HOSTS = ['*'] From 76d6284f4b143224737f137aae3ed1ed611b8f84 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Thu, 23 Jun 2022 22:54:58 +0500 Subject: [PATCH 2/7] phpmyadmin --- install/install.py | 2 +- plogical/upgrade.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install.py b/install/install.py index eacaac681..85318a7a7 100755 --- a/install/install.py +++ b/install/install.py @@ -723,7 +723,7 @@ password="%s" preFlightsChecks.call(command, self.distro, '[download_install_phpmyadmin]', command, 1, 0, os.EX_OSERR) - command = 'unzip /usr/local/CyberCP/public/phpmyadmin.zip -d /usr/local/CyberCP/public/' + command = 'unzip /usr/local/CyberCP/public/phpmyadmin.zip -d /usr/local/CyberCP/public/phpmyadmin' preFlightsChecks.call(command, self.distro, '[download_install_phpmyadmin]', command, 1, 0, os.EX_OSERR) diff --git a/plogical/upgrade.py b/plogical/upgrade.py index e57004a08..9f8ca0cff 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -276,7 +276,7 @@ class Upgrade: command = 'wget -O /usr/local/CyberCP/public/phpmyadmin.zip https://github.com/usmannasir/cyberpanel/raw/stable/phpmyadmin.zip' Upgrade.executioner(command, 0) - command = 'unzip /usr/local/CyberCP/public/phpmyadmin.zip -d /usr/local/CyberCP/public/' + command = 'unzip /usr/local/CyberCP/public/phpmyadmin.zip -d /usr/local/CyberCP/public/phpmyadmin' Upgrade.executioner(command, 0) command = 'mv /usr/local/CyberCP/public/phpMyAdmin-*-all-languages /usr/local/CyberCP/public/phpmyadmin' From c2d4a8f70615f18d9f43e98121b3e1ab73cabfd5 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Fri, 24 Jun 2022 14:23:26 +0500 Subject: [PATCH 3/7] phpmyadmin --- baseTemplate/templates/baseTemplate/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 82899a0bb..5f4e8c3b9 100755 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -399,7 +399,7 @@
  • - {% trans "WordPresss" %} + {% trans "WordPress" %}
    From fcb6f4c82457ae87f891e8ac0809125e52e5f943 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Tue, 28 Jun 2022 17:05:10 +0500 Subject: [PATCH 6/7] bug fix: incremental backups for s3 --- IncBackups/IncBackupsControl.py | 10 +++++----- plogical/mysqlUtilities.py | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/IncBackups/IncBackupsControl.py b/IncBackups/IncBackupsControl.py index 9d3509384..7c2f9e0b4 100644 --- a/IncBackups/IncBackupsControl.py +++ b/IncBackups/IncBackupsControl.py @@ -138,7 +138,7 @@ class IncJobs(multi.Thread): backupExcludesFile = '/home/%s/backup-exclude.conf' % (self.website.domain) resticBackupExcludeCMD = ' --exclude-file=%s' % (backupExcludesFile) - command = 'export AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s && restic -r s3:s3.amazonaws.com/%s backup %s --password-file %s --exclude /home/%s/backup --exclude /home/%s/incbackup' % ( + command = 'AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s restic -r s3:s3.amazonaws.com/%s backup %s --password-file %s --exclude /home/%s/backup --exclude /home/%s/incbackup' % ( key, secret, self.website.domain, backupPath, self.passwordFile, self.website.domain, self.website.domain) # If /home/%s/backup-exclude.conf file exists lets pass this to restic by appending the command to end. @@ -184,7 +184,7 @@ class IncJobs(multi.Thread): key, secret = self.getAWSData() - command = 'export AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s && restic -r s3:s3.amazonaws.com/%s forget %s --password-file %s' % ( + command = 'AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s restic -r s3:s3.amazonaws.com/%s forget %s --password-file %s' % ( key, secret, self.website, snapshotID, self.passwordFile) result = ProcessUtilities.outputExecutioner(command, self.externalApp) @@ -195,7 +195,7 @@ class IncJobs(multi.Thread): logging.statusWriter(self.statusPath, 'Failed: %s. [5009]' % (result), 1) return 0 - command = 'export AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s && restic -r s3:s3.amazonaws.com/%s prune --password-file %s' % ( + command = 'AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s restic -r s3:s3.amazonaws.com/%s prune --password-file %s' % ( key, secret, self.website, self.passwordFile) ProcessUtilities.outputExecutioner(command, self.externalApp) @@ -204,7 +204,7 @@ class IncJobs(multi.Thread): key, secret = self.getAWSData() - command = 'export AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s && restic -r s3:s3.amazonaws.com/%s restore %s --password-file %s --target %s' % ( + command = 'AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s restic -r s3:s3.amazonaws.com/%s restore %s --password-file %s --target %s' % ( key, secret, self.website, snapshotID, self.passwordFile, self.restoreTarget) result = ProcessUtilities.outputExecutioner(command, self.externalApp) @@ -764,7 +764,7 @@ class IncJobs(multi.Thread): logging.statusWriter(self.statusPath, result, 1) else: key, secret = self.getAWSData() - command = 'export AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s && restic -r s3:s3.amazonaws.com/%s init --password-file %s' % ( + command = 'AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s restic -r s3:s3.amazonaws.com/%s init --password-file %s' % ( key, secret, self.website.domain, self.passwordFile) result = ProcessUtilities.outputExecutioner(command, self.externalApp) diff --git a/plogical/mysqlUtilities.py b/plogical/mysqlUtilities.py index 89153d5c5..9b2e1cb56 100755 --- a/plogical/mysqlUtilities.py +++ b/plogical/mysqlUtilities.py @@ -838,6 +838,7 @@ password=%s if connection == 0: return 0 + cursor.execute("use mysql") if host != None: @@ -855,11 +856,11 @@ password=%s else: query = "SET PASSWORD FOR '" + userName + "'@'%s' = '" % (LOCALHOST) + dbPassword + "'" - cursor.execute(query) - if os.path.exists(ProcessUtilities.debugPath): logging.CyberCPLogFileWriter.writeToFile(query) + cursor.execute(query) + connection.close() return 1 From 6d4addcc858aa37bb465fa2c0aac90ee0961d892 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Wed, 29 Jun 2022 11:37:53 +0500 Subject: [PATCH 7/7] bug fix for oe --- CPScripts/mailscannerinstaller.sh | 2 +- cyberpanel.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CPScripts/mailscannerinstaller.sh b/CPScripts/mailscannerinstaller.sh index 6e324a22b..58912cf95 100644 --- a/CPScripts/mailscannerinstaller.sh +++ b/CPScripts/mailscannerinstaller.sh @@ -40,7 +40,7 @@ DIR=/etc/mail/spamassassin if [ -d "$DIR" ]; then sa-update else - echo "Please install spamassassin through the CyberPanel interface before proceeding" + echo "Please install SpamAssasin through the CyberPanel interface before proceeding" exit fi diff --git a/cyberpanel.sh b/cyberpanel.sh index 64a4928b8..83d9723bf 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1558,7 +1558,7 @@ else fi if [[ "$Server_OS" = "openEuler" ]]; then - #yum install -y lsphp??-redis redis + yum install -y lsphp??-redis redis fi if pgrep "redis" ; then