bug fix: pdns.conf permissions during install/upgrade

This commit is contained in:
Usman Nasir
2020-09-16 18:06:38 +05:00
parent 0df35d4518
commit 6598d61c88
2 changed files with 6 additions and 6 deletions

View File

@@ -619,7 +619,7 @@ class preFlightsChecks:
command = "find /usr/local/CyberCP/ -name '*.pyc' -delete"
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
if self.distro == cent8:
if self.distro == cent8 or self.distro == centos:
command = 'chown root:pdns /etc/pdns/pdns.conf'
preFlightsChecks.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)

View File

@@ -1793,12 +1793,12 @@ imap_folder_list_limit = 0
Upgrade.executioner(command, 0)
if os.path.exists(Upgrade.CentOSPath):
if Upgrade.decideCentosVersion() == CENTOS8:
command = 'chown root:pdns /etc/pdns/pdns.conf'
Upgrade.executioner(command, 0)
command = 'chown root:pdns /etc/pdns/pdns.conf'
Upgrade.executioner(command, 0)
command = 'chmod 640 /etc/pdns/pdns.conf'
Upgrade.executioner(command, 0)
command = 'chmod 640 /etc/pdns/pdns.conf'
Upgrade.executioner(command, 0)
Upgrade.stdOut("Permissions updated.")