use command md5 when md5sum is not there - to support freebsd
Costa Tsaousis (ktsaou) committed
Mar 4, 2017 at 23:52 UTC
13b06ff7cec584abe313199e5d547c2c79940260
1 file changed
+2
-2
netdata-installer.sh
+2
-2
@@ -131,7 +131,7 @@ For the plugins, you will at least need:
131
USAGE
132
}
133
134
-md5sum="$(which md5sum 2>/dev/null || command -v md5sum 2>/dev/null)"
134
+md5sum="$(which md5sum 2>/dev/null || command -v md5sum 2>/dev/null || command -v md5 2>/dev/null)"
135
get_git_config_signatures() {
136
local x s file md5
137
@@ -147,7 +147,7 @@ get_git_config_signatures() {
147
for c in $(git log --follow "conf.d/${x}" | grep ^commit | cut -d ' ' -f 2)
148
do
149
git checkout ${c} "conf.d/${x}" || continue
150
- s="$(cat "conf.d/${x}" | md5sum | cut -d ' ' -f 1)"
150
+ s="$(cat "conf.d/${x}" | ${md5sum} | cut -d ' ' -f 1)"
151
echo >>configs.signatures.tmp "${s}:${x}"
152
echo " ${s}"
153
done