Added fixes for rpm based system usage

This commit is contained in:
Alexey Berezhok
2024-04-14 22:48:16 +03:00
parent 68a01be7c3
commit 8bcf0d1d01
46 changed files with 351 additions and 118 deletions

View File

@@ -750,7 +750,7 @@ cp -r /etc/nginx/* $hst_backups/nginx > /dev/null 2>&1
# Backup Apache configuration
systemctl stop httpd > /dev/null 2>&1
cp -r /etc/httpd/* $hst_backups/httpd > /dev/null 2>&1
rm -f /etc/httpd/conf.d/* > /dev/null 2>&1
rm -f /etc/httpd/conf.h.d/* > /dev/null 2>&1
# Backup PHP-FPM configuration
systemctl stop php*-fpm > /dev/null 2>&1
@@ -1309,12 +1309,12 @@ check_result $? "nginx start failed"
if [ "$apache" = 'yes' ]; then
echo "[ * ] Configuring Apache Web Server..."
mkdir -p /etc/httpd/conf.d
mkdir -p /etc/httpd/conf.d/domains
mkdir -p /etc/httpd/conf.h.d
mkdir -p /etc/httpd/conf.h.d/domains
# Copy configuration files
cp -f $HESTIA_INSTALL_DIR/httpd/httpd.conf /etc/httpd/conf/
cp -f $HESTIA_INSTALL_DIR/httpd/status.conf /etc/httpd/conf.d/hestia-status.conf
cp -f $HESTIA_INSTALL_DIR/httpd/status.conf /etc/httpd/conf.h.d/hestia-status.conf
cp -f $HESTIA_INSTALL_DIR/logrotate/httpd /etc/logrotate.d/
# Enable needed modules
@@ -1334,7 +1334,7 @@ if [ "$apache" = 'yes' ]; then
# Disable prefork and php, enable event
sed 's/LoadModule mpm_prefork_module/#LoadModule mpm_prefork_module/' -i /etc/httpd/conf.modules.d/00-mpm.conf
sed 's/#LoadModule mpm_event_module/LoadModule mpm_event_module/' -i /etc/httpd/conf.modules.d/00-mpm.conf
cp -f $HESTIA_INSTALL_DIR/httpd/hestia-event.conf /etc/httpd/conf.d/
cp -f $HESTIA_INSTALL_DIR/httpd/hestia-event.conf /etc/httpd/conf.h.d/
fi
if [ ! -d /etc/httpd/sites-available ]; then
@@ -1517,7 +1517,7 @@ if [ "$mysql" = 'yes' ] || [ "$mysql8" = 'yes' ]; then
# Configuring Apache2 for PHPMYADMIN
if [ "$apache" = 'yes' ]; then
touch /etc/httpd/conf.d/phpmyadmin.inc
touch /etc/httpd/conf.h.d/phpmyadmin.inc
fi
# Overwrite old files
@@ -1580,7 +1580,7 @@ if [ "$postgresql" = 'yes' ]; then
ln -s /etc/phppgadmin/config.inc.php /usr/share/phppgadmin/conf/
# Configuring phpPgAdmin
if [ "$apache" = 'yes' ]; then
cp -f $HESTIA_INSTALL_DIR/pga/phppgadmin.conf /etc/httpd/conf.d/phppgadmin.inc
cp -f $HESTIA_INSTALL_DIR/pga/phppgadmin.conf /etc/httpd/conf.h.d/phppgadmin.inc
fi
cp -f $HESTIA_INSTALL_DIR/pga/config.inc.php /etc/phppgadmin/