mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-10-26 07:46:35 +01:00
This commit is contained in:
7
.idea/workspace.xml
generated
7
.idea/workspace.xml
generated
@@ -4,10 +4,7 @@
|
||||
<option name="autoReloadType" value="SELECTIVE" />
|
||||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="5251c5c9-f2a1-41f2-bc76-10b517091df1" name="Changes" comment="">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/plogical/installUtilities.py" beforeDir="false" afterPath="$PROJECT_DIR$/plogical/installUtilities.py" afterDir="false" />
|
||||
</list>
|
||||
<list default="true" id="5251c5c9-f2a1-41f2-bc76-10b517091df1" name="Changes" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
@@ -49,7 +46,7 @@
|
||||
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true",
|
||||
"RunOnceActivity.git.unshallow": "true",
|
||||
"SHELLCHECK.PATH": "/Users/cyberpersons/Library/Application Support/JetBrains/PyCharm2025.1/plugins/Shell Script/shellcheck",
|
||||
"git-widget-placeholder": "v2.4.3",
|
||||
"git-widget-placeholder": "v2.4.4-dev",
|
||||
"last_opened_file_path": "/Users/cyberpersons/cyberpanel",
|
||||
"node.js.detected.package.eslint": "true",
|
||||
"node.js.detected.package.tslint": "true",
|
||||
|
||||
@@ -42,35 +42,12 @@ class installUtilities:
|
||||
@staticmethod
|
||||
def addLiteSpeedRepo():
|
||||
try:
|
||||
# Detect OS version to use the correct repository
|
||||
el_version = "7" # Default to el7
|
||||
# Use the official LiteSpeed repository installation script
|
||||
# This supports all OS versions including CentOS/AlmaLinux/Rocky 7, 8, and 9
|
||||
cmd = "wget -O - https://repo.litespeed.sh | bash"
|
||||
|
||||
# Check for OS version
|
||||
if os.path.exists('/etc/os-release'):
|
||||
with open('/etc/os-release', 'r') as f:
|
||||
content = f.read()
|
||||
# Check for RHEL/CentOS/AlmaLinux/Rocky 9
|
||||
if 'VERSION_ID="9' in content or 'VERSION_ID=9' in content:
|
||||
el_version = "9"
|
||||
# Check for RHEL/CentOS/AlmaLinux/Rocky 8
|
||||
elif 'VERSION_ID="8' in content or 'VERSION_ID=8' in content:
|
||||
el_version = "8"
|
||||
res = subprocess.call(cmd, shell=True)
|
||||
|
||||
# Use the appropriate repository URL based on version
|
||||
repo_urls = {
|
||||
"7": "http://rpms.litespeedtech.com/centos/litespeed-repo-1.1-1.el7.noarch.rpm",
|
||||
"8": "http://rpms.litespeedtech.com/centos/litespeed-repo-1.3-1.el8.noarch.rpm",
|
||||
"9": "http://rpms.litespeedtech.com/centos/litespeed-repo-1.3-1.el9.noarch.rpm"
|
||||
}
|
||||
|
||||
repo_url = repo_urls.get(el_version, repo_urls["7"])
|
||||
|
||||
cmd = []
|
||||
cmd.append("rpm")
|
||||
cmd.append("-ivh")
|
||||
cmd.append(repo_url)
|
||||
|
||||
res = subprocess.call(cmd)
|
||||
if res == 1:
|
||||
print("###############################################")
|
||||
print(" Could not add Litespeed repo " )
|
||||
|
||||
Reference in New Issue
Block a user