From 13b06ff7cec584abe313199e5d547c2c79940260 Mon Sep 17 00:00:00 2001 From: "Costa Tsaousis (ktsaou)" Date: Sat, 4 Mar 2017 23:52:13 +0200 Subject: [PATCH] use command md5 when md5sum is not there - to support freebsd --- netdata-installer.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.2