diff --git a/cyberpanel.sh b/cyberpanel.sh index c8a8fba51..4d1cb42e6 100644 --- a/cyberpanel.sh +++ b/cyberpanel.sh @@ -1021,7 +1021,7 @@ Debug_Log2 "Necessary components installed..,5" } Pre_Install_System_Tweak() { -Debug_Log2 "Setting up sytem tweak...,90" +Debug_Log2 "Setting up sytem tweak...,20" Line_Number=$(grep -n "127.0.0.1" /etc/hosts | cut -d: -f 1) My_Hostname=$(hostname) diff --git a/install/install.py b/install/install.py index 315049893..fde5d9a59 100755 --- a/install/install.py +++ b/install/install.py @@ -2157,8 +2157,10 @@ def main(): parser.add_argument('--mysqluser', help='MySQL user if remote is chosen.') parser.add_argument('--mysqlpassword', help='MySQL password if remote is chosen.') parser.add_argument('--mysqlport', help='MySQL port if remote is chosen.') + args = parser.parse_args() + logging.InstallLog.ServerIP = args.publicip logging.InstallLog.writeToFile("Starting CyberPanel installation..,10") preFlightsChecks.stdOut("Starting CyberPanel installation..") diff --git a/install/installLog.py b/install/installLog.py index 2c2b8db39..669cbd48f 100755 --- a/install/installLog.py +++ b/install/installLog.py @@ -1,9 +1,14 @@ +import json import time +import requests + + class InstallLog: fileName = "/var/log/installLogs.txt" - currentPercent = '10' + LogURL = 'http://cloud.cyberpanel.net:8000/servers/RecvData' + ServerIP = '' @staticmethod def writeToFile(message): @@ -22,3 +27,6 @@ class InstallLog: file.writelines("[" + time.strftime( "%m.%d.%Y_%H-%M-%S") + "] " + message + "\n") file.close() + + finalData = json.dumps({'ipAddress': InstallLog.ServerIP, "InstallCyberPanelStatus": message}) + requests.post(InstallLog.LogURL, data=finalData, verify=False) diff --git a/plogical/CyberPanelUpgrade.py b/plogical/CyberPanelUpgrade.py index fe95e1f13..61bf1e42f 100644 --- a/plogical/CyberPanelUpgrade.py +++ b/plogical/CyberPanelUpgrade.py @@ -10,6 +10,8 @@ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "CyberCP.settings") class UpgradeCyberPanel: + LogURL = "http://cloud.cyberpanel.net:8000/settings/RecvData" + def __init__(self, branch, mail, dns, ftp): ipFile = "/etc/cyberpanel/machineIP" f = open(ipFile) @@ -18,8 +20,7 @@ class UpgradeCyberPanel: def PostStatus(self, message): finalData = json.dumps({'ipAddress': self.ipAddress, "UpgradeCyberPanelStatus": message}) - url = "http://de-a.cyberhosting.org:8000/settings/RecvData" - resp = requests.post(url, data=finalData, verify=False) + resp = requests.post(UpgradeCyberPanel.LogURL, data=finalData, verify=False) print (resp.text) def UpgardeNow(self):