diff --git a/bin/v-list-sys-services b/bin/v-list-sys-services index b49e5bcb..77ed0650 100755 --- a/bin/v-list-sys-services +++ b/bin/v-list-sys-services @@ -31,6 +31,10 @@ get_srv_state() { else pids=$(pidof -x $proc_name |tr ' ' '|') fi + if [ -z "$pids" ]; then + #fallback to pgrep + pids=$(pgrep $proc_name |tr '\n' '|') + fi if [ ! -z "$pids" ]; then pid=$(echo $pids|cut -f 1 -d \|) pids=$(egrep "$pids" $tmp_file)