summaryrefslogtreecommitdiffstats
path: root/makeself/install-or-update.sh
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-04-01 20:54:06 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-04-01 20:54:06 +0300
commitcb54ed79a61cc7946853462174f2eabd920f8548 (patch)
tree0bd25c17c0b7de0a0c3ed6339e3adda42c96778b /makeself/install-or-update.sh
parent4152c61153fa5fc5701353cec0ad422f17b1f799 (diff)
properly install default config files
Diffstat (limited to 'makeself/install-or-update.sh')
-rwxr-xr-xmakeself/install-or-update.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/makeself/install-or-update.sh b/makeself/install-or-update.sh
index 225fb0b27a..6e22533224 100755
--- a/makeself/install-or-update.sh
+++ b/makeself/install-or-update.sh
@@ -10,7 +10,7 @@ declare -A configs_signatures=()
if [ ! -d etc/netdata ]
then
- mkdir -p etc/netdata
+ run mkdir -p etc/netdata
fi
for x in $(find etc/netdata.new -name '*.conf' -type f)
@@ -20,6 +20,10 @@ do
t="${x/*etc\/netdata.new\/etc\/netdata/}"
d=$(dirname "${d}")
+ echo >&2 "x: ${x}"
+ echo >&2 "t: ${t}"
+ echo >&2 "d: ${d}"
+
if [ ! -d "${d}" ]
then
run mkdir -p "${d}"
@@ -32,8 +36,8 @@ do
fi
# find the checksum of the existing file
- md5="$(cat "${t}" | ${md5sum} | cut -d ' ' -f 1)"
- echo >&2 "debug md5 of '${t}': ${md5}"
+ md5="$(cat "${t}" | md5sum | cut -d ' ' -f 1)"
+ echo >&2 "md5: ${md5}"
# check if it matches
if [ "${configs_signatures[${md5}]}" = "${f}" ]