Browse Source

Update v-list-sys-services (#4022)

fix for v-list-sys-services debian buster doesn't support option -d for pidof
sahsanu 2 years ago
parent
commit
1d827b1553
1 changed files with 2 additions and 2 deletions
  1. 2 2
      bin/v-list-sys-services

+ 2 - 2
bin/v-list-sys-services

@@ -87,9 +87,9 @@ get_srv_state() {
 
 	# Searching related pids
 	if [ -z $3 ]; then
-		pids=$(pidof -d '|' $name)
+		pids=$(pidof $name | tr ' ' '|')
 	else
-		pids=$(pidof -d '|' -x $name)
+		pids=$(pidof -x $name | tr ' ' '|')
 	fi
 	if [ -z "$pids" ] && [ "$name" != 'nginx' ]; then
 		pids=$(pgrep $name | tr '\n' '|')