mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2026-01-17 13:02:07 +01:00
Update MariaDB package names for consistency and enhance LSMCD service management in cyberpanel.sh
- Changed package names from 'MariaDB-*' to 'mariadb-*' for consistency across scripts. - Modified LSMCD service type from 'forking' to 'simple' and added user/group settings in cyberpanel.sh. - Improved error handling for LSMCD service startup in cyberpanel.sh. - Fixed Django AutoField warnings in install.py by directly calling the fix function.
This commit is contained in:
@@ -1565,7 +1565,7 @@ if [[ "$Server_OS" =~ ^(CentOS|RHEL|AlmaLinux|RockyLinux|CloudLinux|openEuler) ]
|
||||
Check_Return "EPEL repository" "no_exit"
|
||||
|
||||
# Setup MariaDB repository for RHEL 9+ based systems (AlmaLinux 9/10, RockyLinux 9, RHEL 9)
|
||||
if [[ "$Server_OS" =~ ^(AlmaLinux9|AlmaLinux10|RockyLinux9|RHEL9) ]] ; then
|
||||
if [[ "$Server_OS" =~ ^(AlmaLinux9|AlmaLinux10|RockyLinux9|RHEL9|RHEL10) ]] ; then
|
||||
# Use the official MariaDB repository setup script for better compatibility
|
||||
curl -sS "https://downloads.mariadb.com/MariaDB/mariadb_repo_setup" | bash -s -- --mariadb-server-version="10.11" --skip-maxscale --skip-tools
|
||||
Check_Return "MariaDB repository setup" "no_exit"
|
||||
@@ -1587,7 +1587,7 @@ EOF
|
||||
fi
|
||||
fi
|
||||
|
||||
dnf install -y libnsl zip wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel MariaDB-server MariaDB-client MariaDB-devel curl-devel git platform-python-devel tar socat python3 zip unzip bind-utils openssl-devel boost-devel boost-program-options
|
||||
dnf install -y libnsl zip wget strace net-tools curl which bc telnet htop libevent-devel gcc libattr-devel xz-devel mariadb-server mariadb-devel mariadb-client-utils curl-devel git platform-python-devel tar socat python3 zip unzip bind-utils openssl-devel boost-devel boost-program-options
|
||||
Check_Return
|
||||
|
||||
# Install development tools group
|
||||
@@ -2309,12 +2309,13 @@ Description=LiteSpeed Memcached (LSMCD)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
PIDFile=/var/run/lsmcd.pid
|
||||
Type=simple
|
||||
ExecStart=/usr/local/bin/lsmcd -d
|
||||
ExecReload=/bin/kill -HUP $MAINPID
|
||||
KillMode=process
|
||||
Restart=on-failure
|
||||
User=root
|
||||
Group=root
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -2330,6 +2331,9 @@ EOF
|
||||
touch /home/cyberpanel/lsmcd
|
||||
else
|
||||
echo "Warning: LSMCD service failed to start"
|
||||
# Try to get more details about the failure
|
||||
systemctl status lsmcd --no-pager
|
||||
journalctl -u lsmcd --no-pager -n 10
|
||||
fi
|
||||
else
|
||||
echo "Error: LSMCD installation failed"
|
||||
|
||||
@@ -3625,7 +3625,7 @@ def main():
|
||||
checks.installAcme()
|
||||
|
||||
# Fix Django AutoField warnings
|
||||
checks.fix_django_autofield_warnings()
|
||||
fix_django_autofield_warnings()
|
||||
|
||||
## Install and Configure OpenDKIM.
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ class InstallCyberPanel:
|
||||
|
||||
# Install MariaDB packages
|
||||
self.stdOut("Installing MariaDB packages...", 1)
|
||||
mariadb_packages = "MariaDB-server MariaDB-client MariaDB-backup MariaDB-devel"
|
||||
mariadb_packages = "mariadb-server mariadb-devel mariadb-client-utils"
|
||||
command = f"dnf install -y {mariadb_packages}"
|
||||
install_utils.call(command, self.distro, command, command, 1, 0, os.EX_OSERR)
|
||||
|
||||
@@ -693,7 +693,7 @@ gpgcheck=1
|
||||
command = 'dnf clean all'
|
||||
install_utils.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)
|
||||
|
||||
command = 'dnf install MariaDB-server MariaDB-client MariaDB-backup -y'
|
||||
command = 'dnf install mariadb-server mariadb-devel mariadb-client-utils -y'
|
||||
|
||||
install_utils.call(command, self.distro, command, command, 1, 1, os.EX_OSERR, True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user