From 9667e0b256d51e2d9ad6f2edf3ab29ab713d47fe Mon Sep 17 00:00:00 2001 From: spfuture Date: Wed, 10 May 2017 13:18:48 +0300 Subject: [PATCH] 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 --- bin/v-list-sys-services | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/v-list-sys-services b/bin/v-list-sys-services index 9b20ac990..f26227958 100755 --- a/bin/v-list-sys-services +++ b/bin/v-list-sys-services @@ -153,7 +153,7 @@ fi # Checking WEB Backend if [ ! -z "$WEB_BACKEND" ] && [ "$WEB_BACKEND" != 'remote' ]; then - proc_name=$(ls /usr/sbin/php*fpm* |cut -f 4 -d /) + proc_name=$(ls /usr/sbin/php*fpm* | rev | cut -d'/' -f 1 | rev) get_srv_state $proc_name data="$data\nNAME='$WEB_BACKEND' SYSTEM='backend server' STATE='$state'" data="$data CPU='$cpu' MEM='$mem' RTIME='$rtime'"