From 874cdfdc56e94f19f779db337e2d2404de63b486 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Mon, 29 Jan 2024 13:19:20 +0500 Subject: [PATCH] fix mariadb install for ubuntu 20 ref https://community.cyberpanel.net/t/error-we-are-not-able-to-run-debian-frontend-noninteract/52030/2 --- install/installCyberPanel.py | 8 +++++--- plogical/test1.py | 6 +----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 1d8e6a485..7712c4e6a 100755 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -294,9 +294,11 @@ Suites: jammy Components: main main/debug Signed-By: /etc/apt/keyrings/mariadb-keyring.pgp """ - WriteToFile = open(RepoPath, 'w') - WriteToFile.write(RepoContent) - WriteToFile.close() + + if get_Ubuntu_release() > 21.00: + WriteToFile = open(RepoPath, 'w') + WriteToFile.write(RepoContent) + WriteToFile.close() command = 'DEBIAN_FRONTEND=noninteractive apt-get update -y' install.preFlightsChecks.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True) diff --git a/plogical/test1.py b/plogical/test1.py index 54549602c..8c0f284e3 100644 --- a/plogical/test1.py +++ b/plogical/test1.py @@ -36,8 +36,4 @@ # if result: # print(f"Reverse DNS lookup for {ip_address_to_check}: {result}") # else: -# print(f"Reverse DNS lookup failed for {ip_address_to_check}") - - -value = '/home//hey.txt' -print(value[6:]) \ No newline at end of file +# print(f"Reverse DNS lookup failed for {ip_address_to_check}") \ No newline at end of file