mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-15 17:56:12 +01:00
Stop and disable systemd-resolved service to be able to install powerdns.
This commit is contained in:
@@ -26,13 +26,8 @@ class InstallCyberPanel:
|
|||||||
self.distro=distro
|
self.distro=distro
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def stdOut(message):
|
def stdOut(message, log = 0, exit = 0, code = os.EX_OK):
|
||||||
print("\n\n")
|
install.preFlightsChecks.stdOut(message, log, exit, code)
|
||||||
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 installLiteSpeed(self):
|
def installLiteSpeed(self):
|
||||||
@@ -854,6 +849,18 @@ class InstallCyberPanel:
|
|||||||
|
|
||||||
count = 0
|
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:
|
if self.distro == centos:
|
||||||
while (1):
|
while (1):
|
||||||
command = 'yum -y install epel-release yum-plugin-priorities'
|
command = 'yum -y install epel-release yum-plugin-priorities'
|
||||||
|
|||||||
Reference in New Issue
Block a user