From 5d9b551aa65ba59c11ce00e4ed70c34cfe6be888 Mon Sep 17 00:00:00 2001 From: Carl Heaton Date: Mon, 4 Nov 2019 21:45:20 +0000 Subject: [PATCH] Improved alias safe method to get commands and locations of required executables (#6) --- zabbix/zabbix_php_fpm_discovery.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/zabbix/zabbix_php_fpm_discovery.sh b/zabbix/zabbix_php_fpm_discovery.sh index 305df3b..cbed091 100644 --- a/zabbix/zabbix_php_fpm_discovery.sh +++ b/zabbix/zabbix_php_fpm_discovery.sh @@ -2,13 +2,13 @@ #Ramil Valitov ramilvalitov@gmail.com #https://github.com/rvalitov/zabbix-php-fpm -S_PS=`which ps` -S_GREP=`which grep` -S_AWK=`which awk` -S_SORT=`which sort` -S_HEAD=`which head` -S_LSOF=`which lsof` -S_JQ=`which jq` +S_PS=`type -P ps` +S_GREP=`type -P grep` +S_AWK=`type -P awk` +S_SORT=`type -P sort` +S_HEAD=`type -P head` +S_LSOF=`type -P lsof` +S_JQ=`type -P jq` if [[ ! -f $S_PS ]]; then echo "Utility 'ps' not found. Please, install it first." @@ -61,4 +61,4 @@ do fi fi done <<< "$POOL_LIST" -echo -n "]}" \ No newline at end of file +echo -n "]}"