diff --git a/emailMarketing/emailMarketing.py b/emailMarketing/emailMarketing.py index 9a0460c93..3ac749ad6 100755 --- a/emailMarketing/emailMarketing.py +++ b/emailMarketing/emailMarketing.py @@ -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 diff --git a/plogical/backupSchedule.py b/plogical/backupSchedule.py index ec94b85ba..8f8bf9cc3 100755 --- a/plogical/backupSchedule.py +++ b/plogical/backupSchedule.py @@ -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) diff --git a/plogical/website.py b/plogical/website.py index f96fb9e66..ae1216d7b 100755 --- a/plogical/website.py +++ b/plogical/website.py @@ -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}) diff --git a/websiteFunctions/website.py b/websiteFunctions/website.py index 6cfd0a546..48e51cedd 100755 --- a/websiteFunctions/website.py +++ b/websiteFunctions/website.py @@ -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,