diff --git a/.gitignore b/.gitignore
index 9e35ca068..2c1147f95 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*.pyc
ApachController/
+.idea
diff --git a/.idea/CyberCP.iml b/.idea/CyberCP.iml
deleted file mode 100755
index 15888c8f0..000000000
--- a/.idea/CyberCP.iml
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
deleted file mode 100755
index f99b31113..000000000
--- a/.idea/misc.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
deleted file mode 100755
index ac5943840..000000000
--- a/.idea/modules.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
deleted file mode 100755
index 86a39f4e2..000000000
--- a/.idea/workspace.xml
+++ /dev/null
@@ -1,1032 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- webssh
- _shell
- [
- _check_init_param
- Result from paramiko
- trans_back
- get data
- parse_pkey
- privaterKey
- init
- print(self.verifyPath)
- CloudLinux
- verifyPath
- charWidth
- sendClientData
- cpec
- cpecs
- emailMig
- apt install build-essential libssl-dev libffi-dev python3-dev
- python4
- submitForward
- IncBackup
- pip install --ignore-installed
- -r
- websockets
- addRule
- websocket
- conf/key
- addRUle
- virtualenv -p python3 /usr/local/CyberPanel/p3
-
-
- admin.api == 1
- build=5
- /CloudLinux
-
- externalApp
- backupUtilities.Server_root
- checkOwnershipZone
- /usr/local/CyberCP/bin/python2
- metaPath
- $scope.cyberpanelLoading
- self.website
- statusPath
- cyberpanelLoading
- cyberpanel.sh
- https
- self.websocket
-
-
- $PROJECT_DIR$/backup
- $PROJECT_DIR$/emailMarketing
- $PROJECT_DIR$/ftp
- $PROJECT_DIR$/manageServices
- $PROJECT_DIR$/install
- $PROJECT_DIR$/plogical
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 1559525918903
-
-
- 1559525918903
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- file://$PROJECT_DIR$/plogical/adminPass.py
- 1
-
-
-
- file://$PROJECT_DIR$/serverStatus/views.py
- 489
-
-
-
- file://$PROJECT_DIR$/WebTerminal/CPWebSocket.py
- 100
-
-
-
- file://$PROJECT_DIR$/CLManager/templates/CLManager/createPackage.html
- 46
-
-
-
- file://$PROJECT_DIR$/IncBackups/templates/IncBackups/createBackup.html
- 43
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/install/install.py b/install/install.py
index bb85fbdb0..9467fea6e 100755
--- a/install/install.py
+++ b/install/install.py
@@ -948,6 +948,27 @@ class preFlightsChecks:
preFlightsChecks.stdOut("psmisc successfully installed!")
break
+ def installGit(self):
+ try:
+ if os.path.exists("/etc/lsb-release"):
+ command = 'apt -y install git'
+ preFlightsChecks.call(command, self.distro, '[installGit]',
+ 'Install Git',
+ 1, 1, os.EX_OSERR)
+ else:
+ command = 'sudo yum -y install http://repo.iotti.biz/CentOS/7/noarch/lux-release-7-1.noarch.rpm'
+ preFlightsChecks.call(command, self.distro, '[installGit]',
+ 'Install Git',
+ 1, 1, os.EX_OSERR)
+
+ command = 'sudo yum install git -y'
+ preFlightsChecks.call(command, self.distro, '[installGit]',
+ 'Install Git',
+ 1, 1, os.EX_OSERR)
+
+ except BaseException, msg:
+ pass
+
def download_install_CyberPanel(self, mysqlPassword, mysql):
try:
## On OpenVZ there is an issue with requests module, which needs to upgrade requests module
@@ -964,19 +985,19 @@ class preFlightsChecks:
os.chdir(self.path)
- command = "wget http://cyberpanel.sh/CyberPanel.1.9.1.tar.gz"
+ self.installGit()
+
+ os.chdir('/usr/local')
+
+ command = "git clone https://github.com/usmannasir/cyberpanel"
# command = "wget http://cyberpanel.sh/CyberPanelTemp.tar.gz"
preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
'CyberPanel Download',
1, 1, os.EX_OSERR)
- ##
+ shutil.move('cyberpanel', 'CyberCP')
- count = 0
- command = "tar zxf CyberPanel.1.9.1.tar.gz"
- # command = "tar zxf CyberPanelTemp.tar.gz"
- preFlightsChecks.call(command, self.distro, '[download_install_CyberPanel]',
- 'Extract CyberPanel', 1, 1, os.EX_OSERR)
+ ##
### update password:
diff --git a/plogical/upgrade.py b/plogical/upgrade.py
index 318b0f957..8a8649ff7 100755
--- a/plogical/upgrade.py
+++ b/plogical/upgrade.py
@@ -1271,14 +1271,28 @@ class Upgrade:
except:
pass
+ @staticmethod
+ def installGit():
+ try:
+ if os.path.exists("/etc/lsb-release"):
+ command = 'apt -y install git'
+ Upgrade.executioner(command, 'installGit', 0)
+ else:
+ command = 'sudo yum -y install http://repo.iotti.biz/CentOS/7/noarch/lux-release-7-1.noarch.rpm'
+ Upgrade.executioner(command, 'installGit', 0)
+
+ command = 'sudo yum install git -y'
+ Upgrade.executioner(command, 'installGit', 0)
+
+ except BaseException, msg:
+ pass
+
@staticmethod
def downloadAndUpgrade(versionNumbring):
try:
## Download latest version.
- command = "wget https://cyberpanel.net/CyberPanel." + versionNumbring
- # command = "wget https://cyberpanel.net/CyberPanel.1.7.4.tar.gz"
- Upgrade.executioner(command, 'Download latest version', 1)
+ Upgrade.installGit()
## Backup settings file.
@@ -1290,9 +1304,16 @@ class Upgrade:
## Extract Latest files
- # command = "tar zxf CyberPanel.1.7.4.tar.gz"
- command = "tar zxf CyberPanel." + versionNumbring
- Upgrade.executioner(command, 'Extract latest version', 1)
+ os.chdir('/usr/local')
+
+ if os.path.exists('cyberpanel'):
+ shutil.rmtree('cyberpanel')
+
+ command = 'git clone https://github.com/usmannasir/cyberpanel'
+ Upgrade.executioner(command, 'Download CyberPanel', 1)
+
+ shutil.move('cyberpanel', 'CyberCP')
+
## Copy settings file