backuping php-fpm conf file

This commit is contained in:
myvesta 2021-09-14 20:22:35 +02:00 committed by GitHub
commit 2f3bcfe5ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -151,6 +151,25 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
format_domain_idn
get_domain_values 'web'
# backuping php-fpm conf file
if [[ $TPL == "PHP-FPM-"* ]]; then
fpm_tpl_ver=${TPL:8:2}
fpm_ver="${TPL:8:1}.${TPL:9:1}"
fpm_folder="$fpm_ver/fpm/pool.d"
fpm_path="$fpm_ver/fpm/pool.d/$domain.conf"
if [[ $TPL == *"-ioncube" ]]; then
fpm_folder="$fpm_ver/fpm/pool.d-ioncube"
fpm_path = "$fpm_ver/fpm/pool.d-ioncube/$domain.conf"
fi
fpm_original_path="/etc/php/$fpm_path"
fpm_dest_path="$tmpdir/web/$domain/php/$fpm_path"
fpm_dest_folder="$tmpdir/web/$domain/php/$fpm_folder"
if [ -f "$fpm_original_path" ]; then
mkdir -p $fpm_dest_folder
cp $fpm_original_path $fpm_dest_path
fi
fi
# Backup web.conf
cd $tmpdir/web/$domain/
conf="$USER_DATA/web.conf"