From 37661a61d257cfd4805391fc58b22fc36512dfed Mon Sep 17 00:00:00 2001 From: rperper Date: Mon, 29 Oct 2018 09:04:11 -0400 Subject: [PATCH] Stop and disable systemd-resolved service to be able to install powerdns. --- install/installCyberPanel.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/install/installCyberPanel.py b/install/installCyberPanel.py index 479a790e0..f1d94b2ac 100644 --- a/install/installCyberPanel.py +++ b/install/installCyberPanel.py @@ -26,13 +26,8 @@ class InstallCyberPanel: self.distro=distro @staticmethod - def stdOut(message): - print("\n\n") - print ("[" + time.strftime( - "%I-%M-%S-%a-%b-%Y") + "] #########################################################################\n") - print("[" + time.strftime("%I-%M-%S-%a-%b-%Y") + "] " + message + "\n") - print ("[" + time.strftime( - "%I-%M-%S-%a-%b-%Y") + "] #########################################################################\n") + def stdOut(message, log = 0, exit = 0, code = os.EX_OK): + install.preFlightsChecks.stdOut(message, log, exit, code) def installLiteSpeed(self): @@ -854,6 +849,18 @@ class InstallCyberPanel: count = 0 + if self.distro == ubuntu: + command = 'systemctl stop systemd-resolved' + res = subprocess.call(shlex.split(command)) + if res != 0: + InstallCyberPanel.stdOut('Unable to stop systemd.resolved, prohits install of PowerDNS, error #' + + str(res), 1, 1, os.EX_OSERR) + command = 'systemctl disable systemd-resolved.service' + res = subprocess.call(shlex.split(command)) + if res != 0: + InstallCyberPanel.stdOut('Unable to disable systemd.resolved, prohits install of PowerDNS, error #' + + str(res), 1, 1, os.EX_OSERR) + if self.distro == centos: while (1): command = 'yum -y install epel-release yum-plugin-priorities'