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

@@ -67,17 +67,24 @@ csv_list() {
declare -a versions
# List through /etc/php
if [ -n "$WEB_BACKEND" ]; then
for version in /etc/php/*/fpm; do
ver=$(echo "$version" | awk -F"/" '{ print $4 }')
if [ -f /etc/redhat-release ]; then
for version in /etc/opt/remi/php*/; do
ver=$(echo "$version" | awk -F"/" '{ print $5 }' | sed 's|php||')
versions+=("$ver")
done
else
# Fix for modphp
for version in /etc/php/*/cli; do
ver=$(echo "$version" | awk -F"/" '{ print $4 }')
versions+=("$ver")
done
if [ -n "$WEB_BACKEND" ]; then
for version in /etc/php/*/fpm; do
ver=$(echo "$version" | awk -F"/" '{ print $4 }')
versions+=("$ver")
done
else
# Fix for modphp
for version in /etc/php/*/cli; do
ver=$(echo "$version" | awk -F"/" '{ print $4 }')
versions+=("$ver")
done
fi
fi
# Listing data
case $format in