cyberpanel icon indicating copy to clipboard operation
cyberpanel copied to clipboard

Add support for Rocky Linux 8

Open hydrosIII opened this issue 2 years ago • 6 comments

I have tried Cyberpanel in Rocky Linux for a few months and I can say it is stable and well functioning, as it is an alternative to Alma Linux it is possible to install it modifying the install script, so maybe you can add official support to Rocky Linux.

Thanks.

hydrosIII avatar Jul 05 '22 20:07 hydrosIII

I remember RL and AL are supported for long time already , what exactly is the issue you encountered when installing ?

qtwrk avatar Jul 05 '22 22:07 qtwrk

The update script does not work in Rocky Linux it only checks for Alma Linux, Centos and RHEL. https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh

hydrosIII avatar Jul 06 '22 16:07 hydrosIII

I mean this script in the latest branch 2.3.2 https://raw.githubusercontent.com/usmannasir/cyberpanel/$BRANCH_NAME/cyberpanel_upgrade.sh

hydrosIII avatar Jul 11 '22 20:07 hydrosIII

Here https://raw.githubusercontent.com/usmannasir/cyberpanel/v2.3.2/cyberpanel_upgrade.sh In these lines of code Rocky Linux should be added.

if grep -q -E "CentOS Linux 7|CentOS Linux 8" /etc/os-release ; then
  Server_OS="CentOS"
elif grep -q -E "CloudLinux 7|CloudLinux 8" /etc/os-release ; then
  Server_OS="CloudLinux"
elif grep -q "AlmaLinux-8" /etc/os-release ; then
  Server_OS="AlmaLinux"
elif grep -q -E "Ubuntu 18.04|Ubuntu 20.04|Ubuntu 20.10" /etc/os-release ; then
  Server_OS="Ubuntu"
elif grep -q -E "openEuler 20.03|openEuler 22.03" /etc/os-release ; then
  Server_OS="openEuler"
else
  echo -e "Unable to detect your system..."
  echo -e "\nCyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03...\n"
  Debug_Log2 "CyberPanel is supported on x86_64 based Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10, Ubuntu 22.04, CentOS 7, CentOS 8, AlmaLinux 8, RockyLinux 8, CloudLinux 7, CloudLinux 8, openEuler 20.03, openEuler 22.03... [404]"
  exit
fi

hydrosIII avatar Jul 18 '22 19:07 hydrosIII

I was about to make a duplicate. 4 months and no answer has me concerned. Here is what I was about to put in my issue:

https://github.com/usmannasir/cyberpanel/blob/85596f08cfb31393d548de76d33859b9517a383a/cyberpanel_upgrade.sh#L116-L131

I am sure this was brought up before, but clearly in code, as linked above, it will never detect Rocky Linux, and will never be able to continue with an upgrade on Rocky Linux. I ran into this on Rocky Linux 8, and just pulled the file down, added the correct elsif code, and it was able to upgrade. Here is what I added as reference, which should already be there:

elif grep -q -E "Rocky Linux" /etc/os-release ; then Server_OS="RockyLinux"

I basically copied it from /usr/bin/cyberpanel_utility, since the missing logic is there.

I can fork and pull request if that would be easier.

git-jonathankinney avatar Dec 01 '22 04:12 git-jonathankinney