From 13b3306bb4aaa432dd45ac88603e293315bb9817 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Thu, 2 Jan 2020 15:01:20 +0500 Subject: [PATCH] bug fix: lswsgi --- plogical/upgrade.py | 32 ++++---------------------------- preUpgrade.sh | 16 +++++++++++++++- 2 files changed, 19 insertions(+), 29 deletions(-) diff --git a/plogical/upgrade.py b/plogical/upgrade.py index e6f1488f6..6df96c15b 100755 --- a/plogical/upgrade.py +++ b/plogical/upgrade.py @@ -123,33 +123,6 @@ class Upgrade: except BaseException as msg: Upgrade.stdOut(str(msg) + " [mountTemp]", 0) - @staticmethod - def setupPythonWSGI(): - try: - - cwd = os.getcwd() - - command = "wget http://www.litespeedtech.com/packages/lsapi/wsgi-lsapi-1.4.tgz" - Upgrade.executioner(command, 0) - - command = "tar xf wsgi-lsapi-1.4.tgz" - Upgrade.executioner(command, 0) - - os.chdir("wsgi-lsapi-1.4") - - command = "/usr/local/CyberPanel/bin/python ./configure.py" - Upgrade.executioner(command, 0) - - command = "make" - Upgrade.executioner(command, 0) - - command = "cp lswsgi /usr/local/CyberCP/bin/" - Upgrade.executioner(command, 0) - - os.chdir(cwd) - - except: - return 0 @staticmethod def dockerUsers(): @@ -263,6 +236,10 @@ class Upgrade: @staticmethod def setupComposer(): + + if os.path.exists('composer.sh'): + os.remove('composer.sh') + command = "wget https://cyberpanel.sh/composer.sh" Upgrade.executioner(command, 0) @@ -2081,7 +2058,6 @@ service_port = 9000 Upgrade.installPHP73() Upgrade.setupCLI() - Upgrade.setupPythonWSGI() Upgrade.someDirectories() Upgrade.installLSCPD() Upgrade.GeneralMigrations() diff --git a/preUpgrade.sh b/preUpgrade.sh index d10293854..f6c019ff5 100644 --- a/preUpgrade.sh +++ b/preUpgrade.sh @@ -63,7 +63,21 @@ virtualenv -p /usr/bin/python3 /usr/local/CyberCP source /usr/local/CyberCP/bin/activate wget -O requirements.txt https://raw.githubusercontent.com/usmannasir/cyberpanel/$1/requirments.txt pip3.6 install --ignore-installed -r requirements.txt + + +## + +rm -f wsgi-lsapi-1.4.tgz +wget http://www.litespeedtech.com/packages/lsapi/wsgi-lsapi-1.4.tgz +tar xf wsgi-lsapi-1.4.tgz +cd wsgi-lsapi-1.4 +/usr/local/CyberPanel/bin/python ./configure.py +make +cp lswsgi /usr/local/CyberCP/bin/ + +## + systemctl restart lscpd -echo " CyberPanel Upgraded Installed " \ No newline at end of file +echo " CyberPanel Upgraded " \ No newline at end of file