usmannasir
2025-08-14 20:54:38 +05:00
parent e6541df356
commit 00f2565745
2 changed files with 6 additions and 32 deletions

7
.idea/workspace.xml generated
View File

@@ -4,10 +4,7 @@
<option name="autoReloadType" value="SELECTIVE" /> <option name="autoReloadType" value="SELECTIVE" />
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="5251c5c9-f2a1-41f2-bc76-10b517091df1" name="Changes" comment=""> <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>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
@@ -49,7 +46,7 @@
"RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true", "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager": "true",
"RunOnceActivity.git.unshallow": "true", "RunOnceActivity.git.unshallow": "true",
"SHELLCHECK.PATH": "/Users/cyberpersons/Library/Application Support/JetBrains/PyCharm2025.1/plugins/Shell Script/shellcheck", "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", "last_opened_file_path": "/Users/cyberpersons/cyberpanel",
"node.js.detected.package.eslint": "true", "node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true", "node.js.detected.package.tslint": "true",

View File

@@ -42,35 +42,12 @@ class installUtilities:
@staticmethod @staticmethod
def addLiteSpeedRepo(): def addLiteSpeedRepo():
try: try:
# Detect OS version to use the correct repository # Use the official LiteSpeed repository installation script
el_version = "7" # Default to el7 # 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 res = subprocess.call(cmd, shell=True)
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"
# 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: if res == 1:
print("###############################################") print("###############################################")
print(" Could not add Litespeed repo " ) print(" Could not add Litespeed repo " )