summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-03-04 23:52:13 +0200
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-03-04 23:52:13 +0200
commit13b06ff7cec584abe313199e5d547c2c79940260 (patch)
tree0f79ab9d1cfba51031e5b80d19d515d7677b4e1b /netdata-installer.sh
parent89c66bc7389a037231eebc0085bb1d083aaac469 (diff)
use command md5 when md5sum is not there - to support freebsd
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index b078ac6d5f..9957e95b59 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