usmannasir / cyberpanel

Cyber Panel - The hosting control panel for OpenLiteSpeed
GNU General Public License v3.0
1.61k stars 616 forks source link

[BUG] Crash on update - No such file or directory: '/etc/lsb-release' #1288

Closed SaJeTek-Developer closed 4 months ago

SaJeTek-Developer commented 4 months ago

Describe the bug When running the cyberpanel upgrade script, the script crashes and the update does not complete. The script fails at: /usr/local/CyberCP/bin/python /usr/local/CyberCP/CLManager/CageFS.py --function submitinstallImunifyAV

When you manually execute the command, the error message is: Traceback (most recent call last): File "/usr/local/CyberCP/CLManager/CageFS.py", line 15, in <module> from serverStatus.serverStatusUtil import ServerStatusUtil File "/usr/local/CyberCP/serverStatus/serverStatusUtil.py", line 15, in <module> from plogical.virtualHostUtilities import virtualHostUtilities File "/usr/local/CyberCP/plogical/virtualHostUtilities.py", line 20, in <module> from plogical import sslUtilities File "/usr/local/CyberCP/plogical/sslUtilities.py", line 13, in <module> from plogical.acl import ACLManager File "/usr/local/CyberCP/plogical/acl.py", line 6, in <module> from ApachController.ApacheVhosts import ApacheVhost File "/usr/local/CyberCP/ApachController/ApacheVhosts.py", line 17, in <module> class ApacheVhost: File "/usr/local/CyberCP/ApachController/ApacheVhosts.py", line 20, in ApacheVhost if ProcessUtilities.decideDistro() == ProcessUtilities.centos or ProcessUtilities.decideDistro() == ProcessUtilities.cent8: File "/usr/local/CyberCP/plogical/processUtilities.py", line 185, in decideDistro if open(distroPath, 'r').read().find('AlmaLinux release 9') > -1 or open(distroPath, 'r').read().find('Rocky Linux release 9') > -1: FileNotFoundError: [Errno 2] No such file or directory: '/etc/lsb-release'

To Reproduce run the upgrade script: sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

Expected behavior The panel is upgraded

Operating system: Almalinux 9

CyberPanel version: 2.3.5

mohamedab2k commented 4 months ago

same here

moechsner commented 4 months ago

The same Problem is when you make a new Installation on Almalinux 8 and in addition, the database is not filled with tables but is only created empty. for 4 Days the new installation was no problem.

usmannasir commented 4 months ago

fixed