Skip to content

Commit eda0286

Browse files
committed
Bugfix: Removing web domain did not remove php-fpm pool config file
1 parent fe931d0 commit eda0286

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

bin/v-delete-web-domain-backend

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ check_hestia_demo_mode
4646
#----------------------------------------------------------#
4747

4848
# Defining pool directory
49-
pool=$(find -L /etc/php* -type d \( -name "pool.d" -o -name "*fpm.d" \))
49+
pool=$(find -L /etc/php/ -name "$domain.conf" -exec dirname {} \;)
5050
if [ ! -e "$pool" ]; then
5151
check_result $E_NOTEXIST "php-fpm pool doesn't exist"
5252
fi

bin/v-list-user

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ csv_list() {
156156
#----------------------------------------------------------#
157157

158158
check_args '1' "$#" 'USER [FORMAT]'
159+
is_format_valid 'user'
159160
is_object_valid 'user' 'USER' "$user"
160161

161162

func/domain.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ prepare_web_backend() {
9191
backend_version="${BASH_REMATCH[1]}.${BASH_REMATCH[2]}"
9292
pool=$(find -L /etc/php/$backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
9393
else
94+
backend_version=$(php -r "echo (float)phpversion();")
9495
if [ -z "$pool" ] || [ -z "$BACKEND" ]; then
95-
backend_version=$(php -r "echo (float)phpversion();")
9696
pool=$(find -L /etc/php/$backend_version -type d \( -name "pool.d" -o -name "*fpm.d" \))
9797
fi
9898
fi

func/main.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,8 @@ is_object_new() {
231231
# Check if object is valid
232232
is_object_valid() {
233233
if [ $2 = 'USER' ]; then
234-
if [ ! -d "$HESTIA/data/users/$3" ]; then
234+
tstpath="$(readlink -f "$HESTIA/data/users/$3")"
235+
if [ "$(dirname "$tstpath")" != "$(readlink -f "$HESTIA/data/users")" ] || [ ! -d "$HESTIA/data/users/$3" ]; then
235236
check_result $E_NOTEXIST "$1 $3 doesn't exist"
236237
fi
237238
else

0 commit comments

Comments
 (0)