mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 13:25:51 +01:00
add dkim keys to dns records during fetch
This commit is contained in:
@@ -7,15 +7,13 @@
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
<!-- Current language: {{ LANGUAGE_CODE }} -->
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div id="page-title">
|
||||
<h2>{% trans "Terminal" %} - <a target="_blank" href="https://cyberpanel.net/docs/web-terminal/"
|
||||
style="height: 23px;line-height: 21px;"
|
||||
class="btn btn-border btn-alt border-red btn-link font-red" title=""><span>{% trans "Web Terminal Docs" %}</span></a></h2>
|
||||
class="btn btn-border btn-alt border-red btn-link font-red"
|
||||
title=""><span>{% trans "Web Terminal Docs" %}</span></a></h2>
|
||||
<p>{% trans "Execute your terminal commands." %}</p>
|
||||
</div>
|
||||
|
||||
@@ -50,5 +48,4 @@
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -617,6 +617,8 @@ class MailServerManager:
|
||||
command = "sudo cat " + path
|
||||
privateKey = ProcessUtilities.outputExecutioner(command, 'opendkim')
|
||||
|
||||
DNS.createDKIMRecords(domainName)
|
||||
|
||||
data_ret = {'status': 1, 'fetchStatus': 1, 'keysAvailable': 1, 'publicKey': output[leftIndex:rightIndex],
|
||||
'privateKey': privateKey, 'dkimSuccessMessage': 'Keys successfully fetched!',
|
||||
'error_message': "None"}
|
||||
|
||||
@@ -474,6 +474,8 @@ class DNS:
|
||||
leftIndex = output.index('(') + 2
|
||||
rightIndex = output.rindex(')') - 1
|
||||
|
||||
if Records.objects.filter(domainOwner=zone, name="default._domainkey." + topLevelDomain).count() == 0:
|
||||
|
||||
record = Records(domainOwner=zone,
|
||||
domain_id=zone.id,
|
||||
name="default._domainkey." + topLevelDomain,
|
||||
@@ -489,6 +491,10 @@ class DNS:
|
||||
command = ' systemctl restart pdns'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
if ProcessUtilities.decideDistro() == ProcessUtilities.ubuntu:
|
||||
command = ' systemctl restart pdns'
|
||||
ProcessUtilities.executioner(command)
|
||||
|
||||
## Add record to CF If sync enabled
|
||||
|
||||
dns = DNS()
|
||||
|
||||
@@ -6805,4 +6805,5 @@ app.controller('manageGIT', function ($scope, $http, $timeout, $window) {
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
/* Java script code to git tracking ends here */
|
||||
|
||||
Reference in New Issue
Block a user