Make service configuring correct for rpm

This commit is contained in:
Alexey Berezhok
2024-05-04 22:15:25 +03:00
parent c1e7097201
commit c4646bd8e8
10 changed files with 89 additions and 31 deletions

View File

@@ -24,11 +24,11 @@ fi
php_DIR="/run/php"
#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 -q "$user_apache" /etc/passwd; then
if grep -q "$user_apache" /etc/group; then
if [ ! -e "$php_DIR" ]; then
if [ ! -e "$php_DIR" ]; 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 -q "$user_apache" /etc/passwd; then
if grep -q "$user_apache" /etc/group; then
mkdir "$php_DIR"
chmod 755 "$php_DIR"
chown "$user_apache":"$user_apache" "$php_DIR"