File tree Expand file tree Collapse file tree 4 files changed +5
-3
lines changed
Expand file tree Collapse file tree 4 files changed +5
-3
lines changed Original file line number Diff line number Diff 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 {} \; )
5050if [ ! -e " $pool " ]; then
5151 check_result $E_NOTEXIST " php-fpm pool doesn't exist"
5252fi
Original file line number Diff line number Diff line change @@ -156,6 +156,7 @@ csv_list() {
156156# ----------------------------------------------------------#
157157
158158check_args ' 1' " $# " ' USER [FORMAT]'
159+ is_format_valid ' user'
159160is_object_valid ' user' ' USER' " $user "
160161
161162
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change @@ -231,7 +231,8 @@ is_object_new() {
231231# Check if object is valid
232232is_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
You can’t perform that action at this time.
0 commit comments