Skip to content

Commit 8e83f51

Browse files
committed
lsws conversion support for arm: ref https://app.clickup.com/t/86enj7r72
1 parent 874cdfd commit 8e83f51

File tree

2 files changed

+22
-12
lines changed

2 files changed

+22
-12
lines changed

plogical/test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
# imap_port = 993
2929
#
3030
# # User credentials
31-
#
32-
#
31+
# email_address = ''
32+
# password = ''
3333
#
3434
# # Connect to the IMAP server
3535
# mail = imaplib.IMAP4_SSL(imap_server, imap_port)

serverStatus/serverStatusUtil.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -67,34 +67,44 @@ def installLiteSpeed(licenseKey, statusFile):
6767
except:
6868
pass
6969

70-
command = 'wget https://www.litespeedtech.com/packages/6.0/lsws-6.0-ent-x86_64-linux.tar.gz'
70+
from plogical.acl import ACLManager
71+
72+
if ACLManager.ISARM():
73+
command = 'wget https://www.litespeedtech.com/packages/6.0/lsws-6.2-ent-aarch64-linux.tar.gz'
74+
else:
75+
76+
command = 'wget https://www.litespeedtech.com/packages/6.0/lsws-6.2-ent-x86_64-linux.tar.gz'
77+
7178
if ServerStatusUtil.executioner(command, statusFile) == 0:
7279
return 0
7380

7481
if os.path.exists('/usr/local/CyberCP/lsws-6.0/'):
7582
shutil.rmtree('/usr/local/CyberCP/lsws-6.0')
7683

77-
if os.path.exists('/usr/local/CyberCP/lsws-6.0/'):
78-
shutil.rmtree('/usr/local/CyberCP/lsws-6.0/')
84+
if os.path.exists('/usr/local/CyberCP/lsws-6.2/'):
85+
shutil.rmtree('/usr/local/CyberCP/lsws-6.2/')
7986

87+
if ACLManager.ISARM():
88+
command = 'tar zxf lsws-6.2-ent-aarch64-linux.tar.gz -C /usr/local/CyberCP'
89+
else:
90+
command = 'tar zxf lsws-6.2-ent-x86_64-linux.tar.gz -C /usr/local/CyberCP'
8091

81-
command = 'tar zxf lsws-6.0-ent-x86_64-linux.tar.gz -C /usr/local/CyberCP'
8292
if ServerStatusUtil.executioner(command, statusFile) == 0:
8393
return 0
8494

8595
if licenseKey == 'trial':
86-
command = 'wget -q --output-document=/usr/local/CyberCP/lsws-6.0/trial.key http://license.litespeedtech.com/reseller/trial.key'
96+
command = 'wget -q --output-document=/usr/local/CyberCP/lsws-6.2/trial.key http://license.litespeedtech.com/reseller/trial.key'
8797
if ServerStatusUtil.executioner(command, statusFile) == 0:
8898
return 0
8999
else:
90-
writeSerial = open('/usr/local/CyberCP/lsws-6.0/serial.no', 'w')
100+
writeSerial = open('/usr/local/CyberCP/lsws-6.2/serial.no', 'w')
91101
writeSerial.writelines(licenseKey)
92102
writeSerial.close()
93103

94-
shutil.copy('/usr/local/CyberCP/serverStatus/litespeed/install.sh', '/usr/local/CyberCP/lsws-6.0/')
95-
shutil.copy('/usr/local/CyberCP/serverStatus/litespeed/functions.sh', '/usr/local/CyberCP/lsws-6.0/')
104+
shutil.copy('/usr/local/CyberCP/serverStatus/litespeed/install.sh', '/usr/local/CyberCP/lsws-6.2/')
105+
shutil.copy('/usr/local/CyberCP/serverStatus/litespeed/functions.sh', '/usr/local/CyberCP/lsws-6.2/')
96106

97-
os.chdir('/usr/local/CyberCP/lsws-6.0/')
107+
os.chdir('/usr/local/CyberCP/lsws-6.2/')
98108

99109
command = 'chmod +x install.sh'
100110
if ServerStatusUtil.executioner(command, statusFile) == 0:
@@ -121,7 +131,7 @@ def installLiteSpeed(licenseKey, statusFile):
121131
pass
122132

123133
try:
124-
os.rmdir("/usr/local/CyberCP/lsws-6.0")
134+
os.rmdir("/usr/local/CyberCP/lsws-6.2")
125135
except:
126136
pass
127137

0 commit comments

Comments
 (0)