Watchdog updated to include Dovecot, Postfix, PowerDNS, and Pure-FTPd

This commit is contained in:
Brett
2021-08-01 01:54:41 +10:00
parent 83e6ef3f11
commit c6b1593bdd
2 changed files with 153 additions and 48 deletions

View File

@@ -139,7 +139,10 @@ def saveStatus(request):
if service == 'powerdns':
servicePath = '/home/cyberpanel/powerdns'
if status == True:
writeToFile = open(servicePath, 'w+')
writeToFile.close()
pdns = PDNSStatus.objects.get(pk=1)
pdns.serverStatus = 1
@@ -200,6 +203,11 @@ def saveStatus(request):
command = 'sudo systemctl disable pdns'
ProcessUtilities.executioner(command)
try:
os.remove(servicePath)
except:
pass
elif service == 'postfix':