diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-10-29 00:47:14 +0300 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2016-10-29 00:47:14 +0300 |
commit | 04e90b1930fc324b2d767e6cac03edc8be045c27 (patch) | |
tree | d7877bb992003bb238411d699e70cb33fd4d1975 /charts.d/mysql.chart.sh | |
parent | e903222bd9f2403f38c6b74b2521cd576b5420e5 (diff) |
use which or command -v to search for commands in the system path
Diffstat (limited to 'charts.d/mysql.chart.sh')
-rwxr-xr-x | charts.d/mysql.chart.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/charts.d/mysql.chart.sh b/charts.d/mysql.chart.sh index 86feac997c..1363d01f42 100755 --- a/charts.d/mysql.chart.sh +++ b/charts.d/mysql.chart.sh @@ -55,7 +55,7 @@ mysql_check() { shift fi - [ -z "${mysql_cmd}" ] && mysql_cmd="$(which mysql)" + [ -z "${mysql_cmd}" ] && mysql_cmd="$(which mysql 2>/dev/null || command -v mysql 2>/dev/null)" if [ ${#mysql_opts[@]} -eq 0 ] then |