mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 08:16:11 +01:00
arch in upgrade
This commit is contained in:
@@ -2161,11 +2161,26 @@ CREATE TABLE `websiteFunctions_backupsv2` (`id` integer AUTO_INCREMENT NOT NULL
|
|||||||
if os.path.exists(lscpdPath):
|
if os.path.exists(lscpdPath):
|
||||||
os.remove(lscpdPath)
|
os.remove(lscpdPath)
|
||||||
|
|
||||||
lscpdSelection = 'lscpd-0.3.1'
|
|
||||||
if os.path.exists(Upgrade.UbuntuPath):
|
try:
|
||||||
result = open(Upgrade.UbuntuPath, 'r').read()
|
result = subprocess.run('uname -a', capture_output=True, text=True, shell=True)
|
||||||
if result.find('22.04') > -1:
|
|
||||||
lscpdSelection = 'lscpd.0.4.0'
|
if result.stdout.find('aarch64') == -1:
|
||||||
|
lscpdSelection = 'lscpd-0.3.1'
|
||||||
|
if os.path.exists(Upgrade.UbuntuPath):
|
||||||
|
result = open(Upgrade.UbuntuPath, 'r').read()
|
||||||
|
if result.find('22.04') > -1:
|
||||||
|
lscpdSelection = 'lscpd.0.4.0'
|
||||||
|
else:
|
||||||
|
lscpdSelection = 'lscpd.aarch64'
|
||||||
|
|
||||||
|
except:
|
||||||
|
|
||||||
|
lscpdSelection = 'lscpd-0.3.1'
|
||||||
|
if os.path.exists(Upgrade.UbuntuPath):
|
||||||
|
result = open(Upgrade.UbuntuPath, 'r').read()
|
||||||
|
if result.find('22.04') > -1:
|
||||||
|
lscpdSelection = 'lscpd.0.4.0'
|
||||||
|
|
||||||
command = f'cp -f /usr/local/CyberCP/{lscpdSelection} /usr/local/lscp/bin/{lscpdSelection}'
|
command = f'cp -f /usr/local/CyberCP/{lscpdSelection} /usr/local/lscp/bin/{lscpdSelection}'
|
||||||
Upgrade.executioner(command, command, 0)
|
Upgrade.executioner(command, command, 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user