@cryptotaxi247 / netdata-1 / commits / cb54ed79a

properly install default config files

Costa Tsaousis (ktsaou) committed Apr 1, 2017 at 20:54 UTC cb54ed79a61cc7946853462174f2eabd920f8548
1 file changed +7 -3
makeself/install-or-update.sh
+7 -3
@@ -10,7 +10,7 @@ declare -A configs_signatures=()
10
11 if [ ! -d etc/netdata ]
12 then
13 - mkdir -p etc/netdata
13 + run mkdir -p etc/netdata
14 fi
15
16 for x in $(find etc/netdata.new -name '*.conf' -type f)
@@ -20,6 +20,10 @@ do
20 t="${x/*etc\/netdata.new\/etc\/netdata/}"
21 d=$(dirname "${d}")
22
23 + echo >&2 "x: ${x}"
24 + echo >&2 "t: ${t}"
25 + echo >&2 "d: ${d}"
26 +
27 if [ ! -d "${d}" ]
28 then
29 run mkdir -p "${d}"
@@ -32,8 +36,8 @@ do
36 fi
37
38 # find the checksum of the existing file
35 - md5="$(cat "${t}" | ${md5sum} | cut -d ' ' -f 1)"
36 - echo >&2 "debug md5 of '${t}': ${md5}"
39 + md5="$(cat "${t}" | md5sum | cut -d ' ' -f 1)"
40 + echo >&2 "md5: ${md5}"
41
42 # check if it matches
43 if [ "${configs_signatures[${md5}]}" = "${f}" ]