Skip to content

Commit 9aae395

Browse files
author
Serghey Rodin
committed
purely dynamic path for php-fpm
1 parent 07321b2 commit 9aae395

File tree

2 files changed

+4
-26
lines changed

2 files changed

+4
-26
lines changed

bin/v-delete-web-domain-backend

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,9 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
3838
#----------------------------------------------------------#
3939

4040
# Defining pool directory
41-
if [ -d "/etc/php-fpm.d" ]; then
42-
pool="/etc/php-fpm.d"
43-
fi
44-
if [ -d "/etc/php5/fpm/pool.d" ]; then
45-
pool="/etc/php5/fpm/pool.d"
46-
fi
47-
if [ -d "/etc/php/7.0/fpm/pool.d" ]; then
48-
pool="/etc/php/7.0/fpm/pool.d"
49-
fi
41+
pool=$(find /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \))
5042
if [ ! -e "$pool" ]; then
51-
pool=$(find /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \))
52-
if [ ! -e "$pool" ]; then
53-
check_result $E_NOTEXIST "php-fpm pool doesn't exist"
54-
fi
43+
check_result $E_NOTEXIST "php-fpm pool doesn't exist"
5544
fi
5645

5746
# Defining backend type

func/domain.sh

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -84,20 +84,9 @@ is_web_alias_new() {
8484

8585
# Prepare web backend
8686
prepare_web_backend() {
87-
if [ -d "/etc/php-fpm.d" ]; then
88-
pool="/etc/php-fpm.d"
89-
fi
90-
if [ -d "/etc/php5/fpm/pool.d" ]; then
91-
pool="/etc/php5/fpm/pool.d"
92-
fi
93-
if [ -d "/etc/php/7.0/fpm/pool.d" ]; then
94-
pool="/etc/php/7.0/fpm/pool.d"
95-
fi
87+
pool=$(find /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \))
9688
if [ ! -e "$pool" ]; then
97-
pool=$(find /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \))
98-
if [ ! -e "$pool" ]; then
99-
check_result $E_NOTEXIST "php-fpm pool doesn't exist"
100-
fi
89+
check_result $E_NOTEXIST "php-fpm pool doesn't exist"
10190
fi
10291

10392
backend_type="$domain"

0 commit comments

Comments
 (0)