Added fixes in rpm install

This commit is contained in:
Alexey Berezhok
2024-05-01 23:32:47 +03:00
parent d221337bbd
commit 3eaf974c8f
4 changed files with 18 additions and 5 deletions

View File

@@ -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