Skip to content

Commit 9667e0b

Browse files
authored
Update v-list-sys-services
correctly detect service name by '/' delimeter. rev | cut -d'/' -f 1 | rev - get last field This fix detect another path for php-fpm ln -s /opt/remi/php70/root/usr/sbin/php-fpm /usr/sbin/php-fpm
1 parent b1e1635 commit 9667e0b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/v-list-sys-services

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ fi
153153

154154
# Checking WEB Backend
155155
if [ ! -z "$WEB_BACKEND" ] && [ "$WEB_BACKEND" != 'remote' ]; then
156-
proc_name=$(ls /usr/sbin/php*fpm* |cut -f 4 -d /)
156+
proc_name=$(ls /usr/sbin/php*fpm* | rev | cut -d'/' -f 1 | rev)
157157
get_srv_state $proc_name
158158
data="$data\nNAME='$WEB_BACKEND' SYSTEM='backend server' STATE='$state'"
159159
data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'"

0 commit comments

Comments
 (0)