diff --git a/cyberpanel_upgrade.sh b/cyberpanel_upgrade.sh index a7629ce64..7aba557bb 100644 --- a/cyberpanel_upgrade.sh +++ b/cyberpanel_upgrade.sh @@ -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 diff --git a/plogical/Backupsv2.py b/plogical/Backupsv2.py index 36fe6ce1d..8f7d848ae 100644 --- a/plogical/Backupsv2.py +++ b/plogical/Backupsv2.py @@ -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' diff --git a/plogical/dnsUtilities.py b/plogical/dnsUtilities.py index ef8221a7e..0ed38152b 100755 --- a/plogical/dnsUtilities.py +++ b/plogical/dnsUtilities.py @@ -145,7 +145,6 @@ def dnsTemplate(domain, admin): disabled=0, auth=1) record.save() - else: zone = Domains(admin=admin, name=topLevelDomain, type="NATIVE") except: