From: Costa Tsaousis (ktsaou) Date: Sat, 4 Mar 2017 21:52:13 +0000 (+0200) Subject: use command md5 when md5sum is not there - to support freebsd X-Git-Tag: ab-debian_0.20170311.01-0ab1~1^2~9^2 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netdata.git;a=commitdiff_plain;h=13b06ff7cec584abe313199e5d547c2c79940260 use command md5 when md5sum is not there - to support freebsd --- diff --git a/netdata-installer.sh b/netdata-installer.sh index b078ac6d..9957e95b 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -131,7 +131,7 @@ For the plugins, you will at least need: USAGE } -md5sum="$(which md5sum 2>/dev/null || command -v md5sum 2>/dev/null)" +md5sum="$(which md5sum 2>/dev/null || command -v md5sum 2>/dev/null || command -v md5 2>/dev/null)" get_git_config_signatures() { local x s file md5 @@ -147,7 +147,7 @@ get_git_config_signatures() { for c in $(git log --follow "conf.d/${x}" | grep ^commit | cut -d ' ' -f 2) do git checkout ${c} "conf.d/${x}" || continue - s="$(cat "conf.d/${x}" | md5sum | cut -d ' ' -f 1)" + s="$(cat "conf.d/${x}" | ${md5sum} | cut -d ' ' -f 1)" echo >>configs.signatures.tmp "${s}:${x}" echo " ${s}" done