mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-12 16:26:12 +01:00
lscpd for arm
This commit is contained in:
@@ -1551,6 +1551,31 @@ $cfg['Servers'][$i]['LogoutURL'] = 'phpmyadminsignin.php?logout';
|
|||||||
|
|
||||||
lscpdPath = '/usr/local/lscp/bin/lscpd'
|
lscpdPath = '/usr/local/lscp/bin/lscpd'
|
||||||
|
|
||||||
|
# if subprocess.check_output('uname -a').decode("utf-8").find("aarch64") == -1:
|
||||||
|
# lscpdPath = '/usr/local/lscp/bin/lscpd'
|
||||||
|
#
|
||||||
|
# lscpdSelection = 'lscpd-0.3.1'
|
||||||
|
# if os.path.exists('/etc/lsb-release'):
|
||||||
|
# result = open('/etc/lsb-release', 'r').read()
|
||||||
|
# if result.find('22.04') > -1:
|
||||||
|
# lscpdSelection = 'lscpd.0.4.0'
|
||||||
|
# else:
|
||||||
|
# lscpdSelection = 'lscpd.aarch64'
|
||||||
|
|
||||||
|
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('/etc/lsb-release'):
|
||||||
|
result = open('/etc/lsb-release', 'r').read()
|
||||||
|
if result.find('22.04') > -1:
|
||||||
|
lscpdSelection = 'lscpd.0.4.0'
|
||||||
|
else:
|
||||||
|
lscpdSelection = 'lscpd.aarch64'
|
||||||
|
|
||||||
|
except:
|
||||||
|
|
||||||
lscpdSelection = 'lscpd-0.3.1'
|
lscpdSelection = 'lscpd-0.3.1'
|
||||||
if os.path.exists('/etc/lsb-release'):
|
if os.path.exists('/etc/lsb-release'):
|
||||||
result = open('/etc/lsb-release', 'r').read()
|
result = open('/etc/lsb-release', 'r').read()
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import subprocess
|
||||||
|
subprocess.run(self.command, capture_output=self.capture_output, text=True, shell=self.shell)
|
||||||
|
if subprocess.run('uname -a', check=True, shell=True).find('arch64') ==-1:
|
||||||
|
pass
|
||||||
|
else:
|
||||||
|
print('arch64')
|
||||||
Reference in New Issue
Block a user