Skip to content

Commit

Permalink
Merge branch 'v2.3.5-dev' of https://github.com/usmannasir/cyberpanel
Browse files Browse the repository at this point in the history
…into v2.3.5-dev
  • Loading branch information
hassanhashmey committed Aug 23, 2023
2 parents 488bb11 + a9137fe commit f7c2680
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 21 deletions.
2 changes: 1 addition & 1 deletion cyberpanel_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ EOF
elif [[ "$Server_OS" = "Ubuntu" ]] ; then

apt update -y
DEBIAN_FRONTEND=noninteractive apt upgrade -y
export DEBIAN_FRONTEND=noninteractive ; apt-get -o Dpkg::Options::="--force-confold" upgrade -y

if [[ "$Server_OS_Version" = "22" ]] ; then
DEBIAN_FRONTEND=noninteracitve apt install -y dnsutils net-tools htop telnet libcurl4-gnutls-dev libgnutls28-dev libgcrypt20-dev libattr1 libattr1-dev liblzma-dev libgpgme-dev libcurl4-gnutls-dev libssl-dev nghttp2 libnghttp2-dev idn2 libidn2-dev libidn2-0-dev librtmp-dev libpsl-dev nettle-dev libgnutls28-dev libldap2-dev libgssapi-krb5-2 libk5crypto3 libkrb5-dev libcomerr2 libldap2-dev virtualenv git socat vim unzip zip libmariadb-dev-compat libmariadb-dev
Expand Down
21 changes: 2 additions & 19 deletions plogical/Backupsv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,29 +1141,12 @@ def CreateScheduleV2(website, repo, frequency, websiteData, websiteDatabases, we

@staticmethod
def DeleteRepoScheduleV2(website, repo, eu):
import shutil
try:
finalConfigPath = f'/home/{website}/.config/rclone/rclone.conf'

if os.path.exists(finalConfigPath):
command = f'cat {finalConfigPath}'
result = ProcessUtilities.outputExecutioner(command, eu)
new_lines = []
skip_section = False

for line in result.split('\n'):
if line.strip().startswith('[') and line.strip().endswith(']'):
if line.strip() == f'[{repo}]':
skip_section = True
else:
skip_section = False

if not skip_section:
new_lines.append(line)

cmd = f'echo "{new_lines}" > {finalConfigPath}'
result = ProcessUtilities.outputExecutioner(cmd, eu, True)

command = f"sed -i '/\[{repo}\]/,/^$/d' {finalConfigPath}"
ProcessUtilities.outputExecutioner(command, eu, True)


return 1, 'Done'
Expand Down
1 change: 0 additions & 1 deletion plogical/dnsUtilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ def dnsTemplate(domain, admin):
disabled=0,
auth=1)
record.save()

else:
zone = Domains(admin=admin, name=topLevelDomain, type="NATIVE")
except:
Expand Down

0 comments on commit f7c2680

Please sign in to comment.