Added fixes in rpm install

devel
Alexey Berezhok 12 months ago
parent d221337bbd
commit 3eaf974c8f

@ -22,12 +22,12 @@ if [ "$(id -u)" != '0' ]; then
fi
php_DIR="/run/php"
#make php directory in /var/run/directory for php-fpm
#make php directory in /var/run/directory for php-fpm and for hestia-php
if [ -f /etc/redhat-release ]; then
user_apache=$(cat $HESTIA_INSTALL_DIR/php-fpm/multiphp.tpl | grep listen.group | cut -d= -f2 | xargs)
if [ -n "$user_apache" ]; then
if grep "$user_apache" /etc/passwd; then
if grep "$user_apache" /etc/group; then
if grep -q "$user_apache" /etc/passwd; then
if grep -q "$user_apache" /etc/group; then
if [ ! -e "$php_DIR" ]; then
mkdir "$php_DIR"
chmod 755 "$php_DIR"
@ -36,4 +36,13 @@ if [ -f /etc/redhat-release ]; then
fi
fi
fi
if [ ! -e /run/hestia ]; then
mkdir /run/hestia
chown admin:admin /run/hestia
else
own=$(stat -c "%U:%G" /run/hestia)
if [ "$own" != "admin:admin" ]; then
chown admin:admin /run/hestia
fi
fi
fi

@ -689,6 +689,8 @@ dnf install -y https://rpms.remirepo.net/enterprise/remi-release-$release.rpm
if [ "$mysql" = 'yes' ]; then
echo "[ * ] MariaDB"
dnf config-manager --add-repo https://dev.putey.net/bayrepo/hestiacp/raw/branch/master/install/rpm/mysql/mariadb-$(arch).repo
mkdir /var/log/mysql/
chown mysql:mysql /var/log/mysql/
fi
# Enabling MySQL module
@ -704,6 +706,8 @@ echo "[ * ] Hestia Control Panel"
dnf config-manager --add-repo https://dev.putey.net/bayrepo/hestiacp/raw/branch/master/install/rpm/hestia/hestia.repo
rpm --import https://repo.putey.net/repo/gpgkeys/repo.putey.net.pub
check_result $? "rpm import putey.net GPG key failed"
mkdir /var/cache/hestia-nginx/
chown admin:admin /var/cache/hestia-nginx/
# Installing PostgreSQL repo
if [ "$postgresql" = 'yes' ]; then

@ -163,7 +163,7 @@ http {
include fastcgi_params;
fastcgi_param HTTP_EARLY_DATA $rfc_early_data if_not_empty;
fastcgi_param SCRIPT_FILENAME /usr/local/hestia/web/fm/dist/index.php;
fastcgi_pass unix:/run/hestia-php.sock;
fastcgi_pass unix:/run/hestia/php.sock;
fastcgi_index index.php;
}
}

@ -6,7 +6,7 @@ PartOf=hestia.service
[Service]
Type=forking
PIDFile=/run/hestia/php.pid
ExecStart=/usr/local/hestia/php/sbin/hestia-php --fpm-config /usr/local/hestia/php/etc/php-fpm.conf
ExecStart=/usr/local/hestia/php/sbin/php-fpm --fpm-config /usr/local/hestia/php/etc/php-fpm.conf
ExecReload=/bin/kill -USR2 $MAINPID
ExecStop=/bin/kill -TERM $MAINPID
ExecStartPre=/bin/bash -c "/bin/systemctl set-environment HOSTNAME=$(/usr/bin/hostname)"

Loading…
Cancel
Save