@@ -326,25 +326,25 @@ def installCustomOLSBinaries(self):
326326 platform = self .detectPlatform ()
327327 InstallCyberPanel .stdOut (f"Detected platform: { platform } " , 1 )
328328
329- # Platform-specific URLs and checksums (OpenLiteSpeed v1.8.4.1 - v2.0.4 )
329+ # Platform-specific URLs and checksums (OpenLiteSpeed v1.8.4.1 - v2.0.5 Static Build )
330330 BINARY_CONFIGS = {
331331 'rhel8' : {
332- 'url' : 'https://cyberpanel.net/binaries/rhel8/ openlitespeed-phpconfig-x86_64-rhel8' ,
333- 'sha256' : 'a6e07671ee1c9bcc7f2d12de9e95139315cf288709fb23bf431eb417299ad4e9 ' ,
334- 'module_url' : 'https://cyberpanel.net/binaries/rhel8/cyberpanel_ols_x86_64_rhel8.so' ,
335- 'module_sha256' : '1cc71f54d8ae5937d0bd2b2dd27678b47f09f4f7afed2583bbd3493ddd05877f'
332+ 'url' : 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-rhel8-static ' ,
333+ 'sha256' : '6ce688a237615102cc1603ee1999b3cede0ff3482d31e1f65705e92396d34b3a ' ,
334+ 'module_url' : None , # RHEL 8 doesn't have module (use RHEL 9 if needed)
335+ 'module_sha256' : None
336336 },
337337 'rhel9' : {
338- 'url' : 'https://cyberpanel.net/binaries/rhel9/ openlitespeed-phpconfig-x86_64-rhel9' ,
339- 'sha256' : 'a6e07671ee1c9bcc7f2d12de9e95139315cf288709fb23bf431eb417299ad4e9 ' ,
340- 'module_url' : 'https://cyberpanel.net/binaries/rhel9/cyberpanel_ols_x86_64_rhel9 .so' ,
341- 'module_sha256' : 'b5841fa6863bbd9dbac4017acfa946bd643268d6ca0cf16a0cd2f717cfb30330 '
338+ 'url' : 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-rhel9-static ' ,
339+ 'sha256' : '90468fb38767505185013024678d9144ae13100d2355097657f58719d98fbbc4 ' ,
340+ 'module_url' : 'https://cyberpanel.net/cyberpanel_ols_x86_64_rhel .so' ,
341+ 'module_sha256' : '127227db81bcbebf80b225fc747b69cfcd4ad2f01cea486aa02d5c9ba6c18109 '
342342 },
343343 'ubuntu' : {
344- 'url' : 'https://cyberpanel.net/binaries/ubuntu/ openlitespeed-phpconfig-x86_64-ubuntu' ,
345- 'sha256' : 'c6a6b4dddd63a4e4ac9b1b51f6db5bd79230f3219e39397de173518ced198d36 ' ,
346- 'module_url' : 'https://cyberpanel.net/binaries/ubuntu/ cyberpanel_ols_x86_64_ubuntu.so' ,
347- 'module_sha256' : 'd070952fcfe27fac2f2c95db9ae31252071bade2cdcff19cf3b3f7812fa9413a '
344+ 'url' : 'https://cyberpanel.net/openlitespeed-phpconfig-x86_64-ubuntu-static ' ,
345+ 'sha256' : '89aaf66474e78cb3c1666784e0e7a417550bd317e6ab148201bdc318d36710cb ' ,
346+ 'module_url' : 'https://cyberpanel.net/cyberpanel_ols_x86_64_ubuntu.so' ,
347+ 'module_sha256' : 'e7734f1e6226c2a0a8e00c1f6534ea9f577df9081b046736a774b1c52c28e7e5 '
348348 }
349349 }
350350
@@ -386,11 +386,16 @@ def installCustomOLSBinaries(self):
386386 InstallCyberPanel .stdOut ("Continuing with standard OLS" , 1 )
387387 return True # Not fatal, continue with standard OLS
388388
389- # Download module with checksum verification
390- if not self .downloadCustomBinary (MODULE_URL , tmp_module , MODULE_SHA256 ):
391- InstallCyberPanel .stdOut ("ERROR: Failed to download or verify module" , 1 )
392- InstallCyberPanel .stdOut ("Continuing with standard OLS" , 1 )
393- return True # Not fatal, continue with standard OLS
389+ # Download module with checksum verification (if available)
390+ module_downloaded = False
391+ if MODULE_URL and MODULE_SHA256 :
392+ if not self .downloadCustomBinary (MODULE_URL , tmp_module , MODULE_SHA256 ):
393+ InstallCyberPanel .stdOut ("ERROR: Failed to download or verify module" , 1 )
394+ InstallCyberPanel .stdOut ("Continuing with standard OLS" , 1 )
395+ return True # Not fatal, continue with standard OLS
396+ module_downloaded = True
397+ else :
398+ InstallCyberPanel .stdOut ("Note: No CyberPanel module for this platform" , 1 )
394399
395400 # Install OpenLiteSpeed binary
396401 InstallCyberPanel .stdOut ("Installing custom binaries..." , 1 )
@@ -404,31 +409,35 @@ def installCustomOLSBinaries(self):
404409 logging .InstallLog .writeToFile (str (e ) + " [installCustomOLSBinaries - binary install]" )
405410 return False
406411
407- # Install module
408- try :
409- os .makedirs (os .path .dirname (MODULE_PATH ), exist_ok = True )
410- shutil .move (tmp_module , MODULE_PATH )
411- os .chmod (MODULE_PATH , 0o644 )
412- InstallCyberPanel .stdOut ("Installed CyberPanel module" , 1 )
413- except Exception as e :
414- InstallCyberPanel .stdOut (f"ERROR: Failed to install module: { e } " , 1 )
415- logging .InstallLog .writeToFile (str (e ) + " [installCustomOLSBinaries - module install]" )
416- return False
412+ # Install module (if downloaded)
413+ if module_downloaded :
414+ try :
415+ os .makedirs (os .path .dirname (MODULE_PATH ), exist_ok = True )
416+ shutil .move (tmp_module , MODULE_PATH )
417+ os .chmod (MODULE_PATH , 0o644 )
418+ InstallCyberPanel .stdOut ("Installed CyberPanel module" , 1 )
419+ except Exception as e :
420+ InstallCyberPanel .stdOut (f"ERROR: Failed to install module: { e } " , 1 )
421+ logging .InstallLog .writeToFile (str (e ) + " [installCustomOLSBinaries - module install]" )
422+ return False
417423
418424 # Verify installation
419- if os .path .exists (OLS_BINARY_PATH ) and os .path .exists (MODULE_PATH ):
420- InstallCyberPanel .stdOut ("=" * 50 , 1 )
421- InstallCyberPanel .stdOut ("Custom Binaries Installed Successfully" , 1 )
422- InstallCyberPanel .stdOut ("Features enabled:" , 1 )
423- InstallCyberPanel .stdOut (" - Apache-style .htaccess support" , 1 )
424- InstallCyberPanel .stdOut (" - php_value/php_flag directives" , 1 )
425- InstallCyberPanel .stdOut (" - Enhanced header control" , 1 )
426- InstallCyberPanel .stdOut (f"Backup: { backup_dir } " , 1 )
427- InstallCyberPanel .stdOut ("=" * 50 , 1 )
428- return True
429- else :
430- InstallCyberPanel .stdOut ("ERROR: Installation verification failed" , 1 )
431- return False
425+ if os .path .exists (OLS_BINARY_PATH ):
426+ if not module_downloaded or os .path .exists (MODULE_PATH ):
427+ InstallCyberPanel .stdOut ("=" * 50 , 1 )
428+ InstallCyberPanel .stdOut ("Custom Binaries Installed Successfully" , 1 )
429+ InstallCyberPanel .stdOut ("Features enabled:" , 1 )
430+ InstallCyberPanel .stdOut (" - Static-linked cross-platform binary" , 1 )
431+ if module_downloaded :
432+ InstallCyberPanel .stdOut (" - Apache-style .htaccess support" , 1 )
433+ InstallCyberPanel .stdOut (" - php_value/php_flag directives" , 1 )
434+ InstallCyberPanel .stdOut (" - Enhanced header control" , 1 )
435+ InstallCyberPanel .stdOut (f"Backup: { backup_dir } " , 1 )
436+ InstallCyberPanel .stdOut ("=" * 50 , 1 )
437+ return True
438+
439+ InstallCyberPanel .stdOut ("ERROR: Installation verification failed" , 1 )
440+ return False
432441
433442 except Exception as msg :
434443 logging .InstallLog .writeToFile (str (msg ) + " [installCustomOLSBinaries]" )
0 commit comments