mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 00:06:09 +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):
|
||||
os.remove(lscpdPath)
|
||||
|
||||
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'
|
||||
|
||||
try:
|
||||
result = subprocess.run('uname -a', capture_output=True, text=True, shell=True)
|
||||
|
||||
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}'
|
||||
Upgrade.executioner(command, command, 0)
|
||||
|
||||
Reference in New Issue
Block a user