mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 22:06:05 +01:00
dynamically fetch and use port
This commit is contained in:
@@ -341,8 +341,8 @@ class emailMarketing(multi.Thread):
|
||||
if (items.verificationStatus == 'Verified' or self.extraArgs[
|
||||
'verificationCheck']) and not items.verificationStatus == 'REMOVED':
|
||||
try:
|
||||
|
||||
removalLink = "https:\/\/" + ipAddress + ":8090\/emailMarketing\/remove\/" + self.extraArgs[
|
||||
port = ProcessUtilities.fetchCurrentPort()
|
||||
removalLink = "https:\/\/" + ipAddress + ":%s\/emailMarketing\/remove\/" % (port) + self.extraArgs[
|
||||
'listName'] + "\/" + items.email
|
||||
messageText = emailMessage.emailMessage.encode('utf-8', 'replace')
|
||||
message['To'] = items.email
|
||||
|
||||
@@ -57,8 +57,10 @@ class backupSchedule:
|
||||
file = open(pathToFile, "w+")
|
||||
file.close()
|
||||
|
||||
port = ProcessUtilities.fetchCurrentPort()
|
||||
|
||||
finalData = json.dumps({'randomFile': pathToFile, 'websiteToBeBacked': virtualHost})
|
||||
r = requests.post("https://localhost:8090/backup/localInitiate", data=finalData, verify=False)
|
||||
r = requests.post("https://localhost:%s/backup/localInitiate" % (port), data=finalData, verify=False)
|
||||
|
||||
if os.path.exists(ProcessUtilities.debugPath):
|
||||
logging.CyberCPLogFileWriter.writeToFile(r.text)
|
||||
|
||||
@@ -1763,7 +1763,9 @@ class WebsiteManager:
|
||||
ipData = f.read()
|
||||
ipAddress = ipData.split('\n', 1)[0]
|
||||
|
||||
webhookURL = 'https://' + ipAddress + ':8090/websites/' + self.domain + '/gitNotify'
|
||||
port = ProcessUtilities.fetchCurrentPort()
|
||||
|
||||
webhookURL = 'https://' + ipAddress + ':%s/websites/' % (port) + self.domain + '/gitNotify'
|
||||
|
||||
return render(request, 'websiteFunctions/setupGit.html',
|
||||
{'domainName': self.domain, 'installed': 1, 'webhookURL': webhookURL})
|
||||
|
||||
@@ -2054,7 +2054,9 @@ class WebsiteManager:
|
||||
ipData = f.read()
|
||||
ipAddress = ipData.split('\n', 1)[0]
|
||||
|
||||
webhookURL = 'https://' + ipAddress + ':8090/websites/' + self.domain + '/gitNotify'
|
||||
port = ProcessUtilities.fetchCurrentPort()
|
||||
|
||||
webhookURL = 'https://' + ipAddress + ':%s/websites/' % (port) + self.domain + '/gitNotify'
|
||||
|
||||
return render(request, 'websiteFunctions/setupGit.html',
|
||||
{'domainName': self.domain, 'installed': 1, 'webhookURL': webhookURL})
|
||||
@@ -3131,7 +3133,9 @@ StrictHostKeyChecking no
|
||||
|
||||
##
|
||||
|
||||
webHookURL = 'https://%s:8090/websites/%s/webhook' % (ACLManager.fetchIP(), self.domain)
|
||||
port = ProcessUtilities.fetchCurrentPort()
|
||||
|
||||
webHookURL = 'https://%s:%s/websites/%s/webhook' % (ACLManager.fetchIP(), port, self.domain)
|
||||
|
||||
data_ret = {'status': 1, 'repo': 1, 'finalBranches': branches, 'deploymentKey': deploymentKey,
|
||||
'remote': remote, 'remoteResult': remoteResult, 'totalCommits': totalCommits, 'home': self.home,
|
||||
|
||||
Reference in New Issue
Block a user