Merge branch 'v2.3.5-dev' of https://github.com/usmannasir/cyberpanel into v2.3.5-dev

This commit is contained in:
unknown
2023-08-23 10:44:19 +05:00
3 changed files with 3 additions and 21 deletions

View File

@@ -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

View File

@@ -1141,29 +1141,12 @@ team_drive =
@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'

View File

@@ -145,7 +145,6 @@ class DNS:
disabled=0,
auth=1)
record.save()
else:
zone = Domains(admin=admin, name=topLevelDomain, type="NATIVE")
except: