compatibility fixes at the installer
Costa Tsaousis (ktsaou) committed
Feb 12, 2017 at 23:29 UTC
c97eaeb9dfad7190e03c0ca264ea6ae76f404edd
2 files changed
+102
-81
installer/functions.sh
+51
-40
@@ -20,43 +20,45 @@ setup_terminal() {
20
# Is stderr on the terminal? If not, then fail
21
test -t 2 || return 1
22
23
- if [ ! -z "$TPUT_CMD" ]
23
+ if check_cmd tput
24
then
25
- if [ $[$($TPUT_CMD colors 2>/dev/null)] -ge 8 ]
25
+ if [ $(( $(tput colors 2>/dev/null) )) -ge 8 ]
26
then
27
# Enable colors
28
- COLOR_RESET="\e[0m"
29
- COLOR_BLACK="\e[30m"
30
- COLOR_RED="\e[31m"
31
- COLOR_GREEN="\e[32m"
32
- COLOR_YELLOW="\e[33m"
33
- COLOR_BLUE="\e[34m"
34
- COLOR_PURPLE="\e[35m"
35
- COLOR_CYAN="\e[36m"
36
- COLOR_WHITE="\e[37m"
37
- COLOR_BGBLACK="\e[40m"
38
- COLOR_BGRED="\e[41m"
39
- COLOR_BGGREEN="\e[42m"
40
- COLOR_BGYELLOW="\e[43m"
41
- COLOR_BGBLUE="\e[44m"
42
- COLOR_BGPURPLE="\e[45m"
43
- COLOR_BGCYAN="\e[46m"
44
- COLOR_BGWHITE="\e[47m"
45
- COLOR_BOLD="\e[1m"
46
- COLOR_DIM="\e[2m"
47
- COLOR_UNDERLINED="\e[4m"
48
- COLOR_BLINK="\e[5m"
49
- COLOR_INVERTED="\e[7m"
28
+ TPUT_RESET="$(tput sgr 0)"
29
+ TPUT_BLACK="$(tput setaf 0)"
30
+ TPUT_RED="$(tput setaf 1)"
31
+ TPUT_GREEN="$(tput setaf 2)"
32
+ TPUT_YELLOW="$(tput setaf 3)"
33
+ TPUT_BLUE="$(tput setaf 4)"
34
+ TPUT_PURPLE="$(tput setaf 5)"
35
+ TPUT_CYAN="$(tput setaf 6)"
36
+ TPUT_WHITE="$(tput setaf 7)"
37
+ TPUT_BGBLACK="$(tput setab 0)"
38
+ TPUT_BGRED="$(tput setab 1)"
39
+ TPUT_BGGREEN="$(tput setab 2)"
40
+ TPUT_BGYELLOW="$(tput setab 3)"
41
+ TPUT_BGBLUE="$(tput setab 4)"
42
+ TPUT_BGPURPLE="$(tput setab 5)"
43
+ TPUT_BGCYAN="$(tput setab 6)"
44
+ TPUT_BGWHITE="$(tput setab 7)"
45
+ TPUT_BOLD="$(tput bold)"
46
+ TPUT_DIM="$(tput dim)"
47
+ TPUT_UNDERLINED="$(tput smul)"
48
+ TPUT_BLINK="$(tput blink)"
49
+ TPUT_INVERTED="$(tput rev)"
50
+ TPUT_STANDOUT="$(tput smso)"
51
+ TPUT_BELL="$(tput bel)"
52
+ TPUT_CLEAR="$(tput clear)"
53
fi
54
fi
55
56
return 0
57
}
55
-TPUT_CMD="$(which_cmd tput)"
58
setup_terminal
59
60
progress() {
59
- printf >&2 " --- ${COLOR_DIM}${COLOR_BOLD}${*}${COLOR_RESET} --- \n"
61
+ echo >&2 " --- ${TPUT_DIM}${TPUT_BOLD}${*}${TPUT_RESET} --- "
62
}
63
64
# -----------------------------------------------------------------------------
@@ -67,7 +69,7 @@ netdata_banner() {
69
l3=" | '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' '-' " \
70
l4=" +----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+--->" \
71
sp=" " \
70
- netdata="netdata" start end msg="${*}" chartcolor="${COLOR_DIM}"
72
+ netdata="netdata" start end msg="${*}" chartcolor="${TPUT_DIM}"
73
74
[ ${#msg} -lt ${#netdata} ] && msg="${msg}${sp:0:$(( ${#netdata} - ${#msg}))}"
75
[ ${#msg} -gt $(( ${#l2} - 20 )) ] && msg="${msg:0:$(( ${#l2} - 23 ))}..."
@@ -77,10 +79,10 @@ netdata_banner() {
79
end=$(( ${start} + ${#msg} + 4 ))
80
81
echo >&2
80
- echo >&2 -e "${chartcolor}${l1}${COLOR_RESET}"
81
- echo >&2 -e "${chartcolor}${l2:0:start}${sp:0:2}${COLOR_RESET}${COLOR_BOLD}${COLOR_GREEN}${netdata}${COLOR_RESET}${chartcolor}${sp:0:$((end - start - 2 - ${#netdata}))}${l2:end:$((${#l2} - end))}${COLOR_RESET}"
82
- echo >&2 -e "${chartcolor}${l3:0:start}${sp:0:2}${COLOR_RESET}${COLOR_BOLD}${COLOR_CYAN}${msg}${COLOR_RESET}${chartcolor}${sp:0:2}${l3:end:$((${#l2} - end))}${COLOR_RESET}"
83
- echo >&2 -e "${chartcolor}${l4}${COLOR_RESET}"
82
+ echo >&2 "${chartcolor}${l1}${TPUT_RESET}"
83
+ echo >&2 "${chartcolor}${l2:0:start}${sp:0:2}${TPUT_RESET}${TPUT_BOLD}${TPUT_GREEN}${netdata}${TPUT_RESET}${chartcolor}${sp:0:$((end - start - 2 - ${#netdata}))}${l2:end:$((${#l2} - end))}${TPUT_RESET}"
84
+ echo >&2 "${chartcolor}${l3:0:start}${sp:0:2}${TPUT_RESET}${TPUT_BOLD}${TPUT_CYAN}${msg}${TPUT_RESET}${chartcolor}${sp:0:2}${l3:end:$((${#l2} - end))}${TPUT_RESET}"
85
+ echo >&2 "${chartcolor}${l4}${TPUT_RESET}"
86
echo >&2
87
}
88
@@ -106,6 +108,14 @@ service() {
108
109
# -----------------------------------------------------------------------------
110
111
+run_ok() {
112
+ printf >&2 "${TPUT_BGGREEN}${TPUT_WHITE}${TPUT_BOLD} OK ${TPUT_RESET} ${*} \n\n"
113
+}
114
+
115
+run_failed() {
116
+ printf >&2 "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD} FAILED ${TPUT_RESET} ${*} \n\n"
117
+}
118
+
119
run_logfile="/dev/null"
120
run() {
121
local user="${USER}" dir="$(basename "${PWD}")" info info_console
@@ -113,29 +123,29 @@ run() {
123
if [ "${UID}" = "0" ]
124
then
125
info="[root ${dir}]# "
116
- info_console="[${COLOR_DIM}${dir}${COLOR_RESET}]# "
126
+ info_console="[${TPUT_DIM}${dir}${TPUT_RESET}]# "
127
else
128
info="[${user} ${dir}]$ "
119
- info_console="[${COLOR_DIM}${dir}${COLOR_RESET}]$ "
129
+ info_console="[${TPUT_DIM}${dir}${TPUT_RESET}]$ "
130
fi
131
132
printf >> "${run_logfile}" "${info}"
133
printf >> "${run_logfile}" "%q " "${@}"
134
printf >> "${run_logfile}" " ... "
135
126
- printf >&2 "${info_console}${COLOR_BOLD}${COLOR_YELLOW}"
136
+ printf >&2 "${info_console}${TPUT_BOLD}${TPUT_YELLOW}"
137
printf >&2 "%q " "${@}"
128
- printf >&2 "${COLOR_RESET}\n"
138
+ printf >&2 "${TPUT_RESET}\n"
139
140
"${@}"
141
142
local ret=$?
143
if [ ${ret} -ne 0 ]
144
then
135
- printf >&2 "${COLOR_BGRED}${COLOR_WHITE}${COLOR_BOLD} FAILED ${COLOR_RESET}\n\n"
145
+ run_failed
146
printf >> "${run_logfile}" "FAILED with exit code ${ret}\n"
147
else
138
- printf >&2 "${COLOR_BGGREEN}${COLOR_WHITE}${COLOR_BOLD} OK ${COLOR_RESET}\n\n"
148
+ run_ok
149
printf >> "${run_logfile}" "OK\n"
150
fi
151
@@ -146,7 +156,7 @@ portable_add_user() {
156
local username="${1}"
157
158
getent passwd "${username}" > /dev/null 2>&1
149
- [ $? -eq 0 ] && return 0
159
+ [ $? -eq 0 ] && echo >&2 "User '${username}' already exists." && return 0
160
161
echo >&2 "Adding ${username} user account ..."
162
@@ -179,7 +189,7 @@ portable_add_group() {
189
local groupname="${1}"
190
191
getent group "${groupname}" > /dev/null 2>&1
182
- [ $? -eq 0 ] && return 0
192
+ [ $? -eq 0 ] && echo >&2 "Group '${groupname}' already exists." && return 0
193
194
echo >&2 "Adding ${groupname} user group ..."
195
@@ -209,13 +219,14 @@ portable_add_user_to_group() {
219
local groupname="${1}" username="${2}"
220
221
getent group "${groupname}" > /dev/null 2>&1
212
- [ $? -ne 0 ] && return 1
222
+ [ $? -ne 0 ] && echo >&2 "Group '${groupname}' does not exist." && return 1
223
224
# find the user is already in the group
225
local users=$(getent group "${groupname}" | cut -d ':' -f 4)
226
if [[ ",${users}," =~ ,${username}, ]]
227
then
228
# username is already there
229
+ echo >&2 "User '${username}' is already in group '${groupname}'."
230
return 0
231
else
232
# username is not in group
netdata-installer.sh
+51
-41
@@ -202,25 +202,32 @@ do
202
done
203
204
netdata_banner "real-time performance monitoring, done right!"
205
-cat <<BANNER
205
+cat <<BANNER1
206
207
You are about to build and install netdata to your system.
208
209
It will be installed at these locations:
210
211
- - the daemon at ${NETDATA_PREFIX}/usr/sbin/netdata
212
- - config files at ${NETDATA_PREFIX}/etc/netdata
213
- - web files at ${NETDATA_PREFIX}/usr/share/netdata
214
- - plugins at ${NETDATA_PREFIX}/usr/libexec/netdata
215
- - cache files at ${NETDATA_PREFIX}/var/cache/netdata
216
- - db files at ${NETDATA_PREFIX}/var/lib/netdata
217
- - log files at ${NETDATA_PREFIX}/var/log/netdata
218
- - pid file at ${NETDATA_PREFIX}/var/run
211
+ - the daemon at ${TPUT_CYAN}${NETDATA_PREFIX}/usr/sbin/netdata${TPUT_RESET}
212
+ - config files in ${TPUT_CYAN}${NETDATA_PREFIX}/etc/netdata${TPUT_RESET}
213
+ - web files in ${TPUT_CYAN}${NETDATA_PREFIX}/usr/share/netdata${TPUT_RESET}
214
+ - plugins in ${TPUT_CYAN}${NETDATA_PREFIX}/usr/libexec/netdata${TPUT_RESET}
215
+ - cache files in ${TPUT_CYAN}${NETDATA_PREFIX}/var/cache/netdata${TPUT_RESET}
216
+ - db files in ${TPUT_CYAN}${NETDATA_PREFIX}/var/lib/netdata${TPUT_RESET}
217
+ - log files in ${TPUT_CYAN}${NETDATA_PREFIX}/var/log/netdata${TPUT_RESET}
218
+BANNER1
219
+
220
+[ "${UID}" -eq 0 ] && cat <<BANNER2
221
+ - pid file at ${TPUT_CYAN}${NETDATA_PREFIX}/var/run/netdata.pid${TPUT_RESET}
222
+ - logrotate file at ${TPUT_CYAN}/etc/logrotate.d/netdata${TPUT_RESET}
223
+BANNER2
224
+
225
+cat <<BANNER3
226
227
This installer allows you to change the installation path.
228
Press Control-C and run the same command with --help for help.
229
223
-BANNER
230
+BANNER3
231
232
if [ "${UID}" -ne 0 ]
233
then
@@ -229,7 +236,7 @@ if [ "${UID}" -ne 0 ]
236
netdata_banner "wrong command line options!"
237
cat <<NONROOTNOPREFIX
238
232
- Sorry! This will fail!
239
+ ${TPUT_RED}${TPUT_BOLD}Sorry! This will fail!${TPUT_RESET}
240
241
You are attempting to install netdata as non-root, but you plan
242
to install it in system paths.
@@ -253,7 +260,7 @@ NONROOTNOPREFIX
260
else
261
cat <<NONROOT
262
256
- IMPORTANT:
263
+ ${TPUT_RED}${TPUT_BOLD}IMPORTANT${TPUT_RESET}:
264
You are about to install netdata as a non-root user.
265
Netdata will work, but a few data collection modules that
266
require root access will fail.
@@ -261,7 +268,7 @@ NONROOTNOPREFIX
268
If you installing netdata permanently on your system, run
269
the installer like this:
270
264
- sudo $0 ${@}
271
+ ${TPUT_YELLOW}${TPUT_BOLD}sudo $0 ${@}${TPUT_RESET}
272
273
NONROOT
274
fi
@@ -327,9 +334,9 @@ if [ ${DONOTWAIT} -eq 0 ]
334
then
335
if [ ! -z "${NETDATA_PREFIX}" ]
336
then
330
- eval "read >&2 -ep \$'\001${COLOR_BOLD}${COLOR_GREEN}\002Press ENTER to build and install netdata to \'\001${COLOR_CYAN}\002${NETDATA_PREFIX}\001${COLOR_YELLOW}\002\'\001${COLOR_RESET}\002 > ' -e -r REPLY"
337
+ eval "read >&2 -ep \$'\001${TPUT_BOLD}${TPUT_GREEN}\002Press ENTER to build and install netdata to \'\001${TPUT_CYAN}\002${NETDATA_PREFIX}\001${TPUT_YELLOW}\002\'\001${TPUT_RESET}\002 > ' -e -r REPLY"
338
else
332
- eval "read >&2 -ep \$'\001${COLOR_BOLD}${COLOR_GREEN}\002Press ENTER to build and install netdata to your system\001${COLOR_RESET}\002 > ' -e -r REPLY"
339
+ eval "read >&2 -ep \$'\001${TPUT_BOLD}${TPUT_GREEN}\002Press ENTER to build and install netdata to your system\001${TPUT_RESET}\002 > ' -e -r REPLY"
340
fi
341
fi
342
@@ -480,7 +487,8 @@ do
487
if [ -z "${md5sum}" -o ! -x "${md5sum}" ]
488
then
489
# we don't have md5sum - keep it
483
- cp -p "${x}" "${x}.installer_backup.${installer_backup_suffix}"
490
+ echo >&2 "File '${TPUT_CYAN}${x}${TPUT_RESET}' ${TPUT_RET}is not known to distribution${TPUT_RESET}. Keeping it."
491
+ run cp -p "${x}" "${x}.installer_backup.${installer_backup_suffix}"
492
else
493
# find it relative filename
494
f="${x/*\/etc\/netdata\//}"
@@ -499,15 +507,15 @@ do
507
if [ "${configs_signatures[${md5}]}" = "${f}" ]
508
then
509
# it is a stock version - don't keep it
502
- echo >&2 "File '${x}' is stock version."
510
+ echo >&2 "File '${TPUT_CYAN}${x}${TPUT_RESET}' is stock version."
511
else
512
# edited by user - keep it
505
- echo >&2 "File '${x}' has been edited by user."
506
- cp -p "${x}" "${x}.installer_backup.${installer_backup_suffix}"
513
+ echo >&2 "File '${TPUT_CYAN}${x}${TPUT_RESET}' ${TPUT_RED} has been edited by user${TPUT_RESET}. Keeping it."
514
+ run cp -p "${x}" "${x}.installer_backup.${installer_backup_suffix}"
515
fi
516
else
509
- echo >&2 "File '${x}' cannot be check for custom edits."
510
- cp -p "${x}" "${x}.installer_backup.${installer_backup_suffix}"
517
+ echo >&2 "File '${TPUT_CYAN}${x}${TPUT_RESET}' ${TPUT_RET}cannot be checked for custom edits${TPUT_RESET}. Keeping it."
518
+ run cp -p "${x}" "${x}.installer_backup.${installer_backup_suffix}"
519
fi
520
fi
521
@@ -525,14 +533,14 @@ run make install || exit 1
533
534
535
# -----------------------------------------------------------------------------
528
-progress "Restore netdata configuration files"
536
+progress "Restore user edited netdata configuration files"
537
538
for x in $(find "${NETDATA_PREFIX}/etc/netdata/" -name '*.conf' -type f)
539
do
540
if [ -f "${x}.installer_backup.${installer_backup_suffix}" ]
541
then
534
- cp -p "${x}.installer_backup.${installer_backup_suffix}" "${x}"
535
- rm -f "${x}.installer_backup.${installer_backup_suffix}"
542
+ run cp -p "${x}.installer_backup.${installer_backup_suffix}" "${x}" && \
543
+ run rm -f "${x}.installer_backup.${installer_backup_suffix}"
544
fi
545
done
546
@@ -560,9 +568,11 @@ if [ ${UID} -eq 0 ]
568
portable_add_user_to_group varnish netdata && NETDATA_ADDED_TO_VARNISH=1
569
portable_add_user_to_group haproxy netdata && NETDATA_ADDED_TO_HAPROXY=1
570
portable_add_user_to_group adm netdata && NETDATA_ADDED_TO_ADM=1
571
+ run_ok
572
+else
573
+ run_failed "The installer does not run as root."
574
fi
575
565
-
576
# -----------------------------------------------------------------------------
577
progress "Install logrotate configuration for netdata"
578
@@ -858,7 +868,7 @@ stop_all_netdata() {
868
869
myns="$(readlink /proc/self/ns/pid 2>/dev/null)"
870
861
- echo >&2 "Stopping a (possibly) running netdata..."
871
+ # echo >&2 "Stopping a (possibly) running netdata (namespace '${myns}')..."
872
873
for p in $(cat "${NETDATA_RUN_DIR}/netdata.pid" 2>/dev/null) \
874
$(cat /var/run/netdata.pid 2>/dev/null) \
@@ -974,15 +984,15 @@ progress "Check KSM (kernel memory deduper)"
984
ksm_is_available_but_disabled() {
985
cat <<KSM1
986
977
-Memory de-duplication instructions
987
+${TPUT_BOLD}Memory de-duplication instructions${TPUT_RESET}
988
989
You have kernel memory de-duper (called Kernel Same-page Merging,
990
or KSM) available, but it is not currently enabled.
991
992
To enable it run:
993
984
- $(printf "${COLOR_YELLOW}${COLOR_BOLD}echo 1 >/sys/kernel/mm/ksm/run${COLOR_RESET}")
985
- $(printf "${COLOR_YELLOW}${COLOR_BOLD}echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs${COLOR_RESET}")
994
+ ${TPUT_YELLOW}${TPUT_BOLD}echo 1 >/sys/kernel/mm/ksm/run${TPUT_RESET}
995
+ ${TPUT_YELLOW}${TPUT_BOLD}echo 1000 >/sys/kernel/mm/ksm/sleep_millisecs${TPUT_RESET}
996
997
If you enable it, you will save 40-60% of netdata memory.
998
@@ -992,7 +1002,7 @@ KSM1
1002
ksm_is_not_available() {
1003
cat <<KSM2
1004
995
-Memory de-duplication not present in your kernel
1005
+${TPUT_BOLD}Memory de-duplication not present in your kernel${TPUT_RESET}
1006
1007
It seems you do not have kernel memory de-duper (called Kernel Same-page
1008
Merging, or KSM) available.
@@ -1021,7 +1031,7 @@ if [ ! -s web/version.txt ]
1031
then
1032
cat <<VERMSG
1033
1024
-Version update check warning
1034
+${TPUT_BOLD}Version update check warning${TPUT_RESET}
1035
1036
The way you downloaded netdata, we cannot find its version. This means the
1037
Update check on the dashboard, will not work.
@@ -1041,7 +1051,7 @@ if [ "${UID}" -ne 0 ]
1051
then
1052
cat <<SETUID_WARNING
1053
1044
-apps.plugin needs privileges
1054
+${TPUT_BOLD}apps.plugin needs privileges${TPUT_RESET}
1055
1056
Since you have installed netdata as a normal user, to have apps.plugin collect
1057
all the needed data, you have to give it the access rights it needs, by running
@@ -1049,14 +1059,14 @@ either of the following sets of commands:
1059
1060
To run apps.plugin with escalated capabilities:
1061
1052
- $(printf "${COLOR_YELLOW}${COLOR_BOLD}sudo chown root:${NETDATA_USER} \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${COLOR_RESET}")
1053
- $(printf "${COLOR_YELLOW}${COLOR_BOLD}sudo chmod 0750 \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${COLOR_RESET}")
1054
- $(printf "${COLOR_YELLOW}${COLOR_BOLD}sudo setcap cap_dac_read_search,cap_sys_ptrace+ep \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${COLOR_RESET}")
1062
+ ${TPUT_YELLOW}${TPUT_BOLD}sudo chown root:${NETDATA_USER} \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${TPUT_RESET}
1063
+ ${TPUT_YELLOW}${TPUT_BOLD}sudo chmod 0750 \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${TPUT_RESET}
1064
+ ${TPUT_YELLOW}${TPUT_BOLD}sudo setcap cap_dac_read_search,cap_sys_ptrace+ep \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${TPUT_RESET}
1065
1066
or, to run apps.plugin as root:
1067
1058
- $(printf "${COLOR_YELLOW}${COLOR_BOLD}sudo chown root \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${COLOR_RESET}")
1059
- $(printf "${COLOR_YELLOW}${COLOR_BOLD}sudo chmod 4755 \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${COLOR_RESET}")
1068
+ ${TPUT_YELLOW}${TPUT_BOLD}sudo chown root \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${TPUT_RESET}
1069
+ ${TPUT_YELLOW}${TPUT_BOLD}sudo chmod 4755 \"${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d/apps.plugin\"${TPUT_RESET}
1070
1071
apps.plugin is performing a hard-coded function of data collection for all
1072
running processes. It cannot be instructed from the netdata daemon to perform
@@ -1213,15 +1223,15 @@ http://this.machine.ip:${NETDATA_PORT}/
1223
1224
To stop netdata, just kill it, with:
1225
1216
- $(printf "${COLOR_YELLOW}${COLOR_BOLD}killall netdata${COLOR_RESET}")
1226
+ ${TPUT_YELLOW}${TPUT_BOLD}killall netdata${TPUT_RESET}
1227
1228
To start it, just run it:
1229
1220
- $(printf "${COLOR_YELLOW}${COLOR_BOLD}${NETDATA_PREFIX}/usr/sbin/netdata${COLOR_RESET}")
1230
+ ${TPUT_YELLOW}${TPUT_BOLD}${NETDATA_PREFIX}/usr/sbin/netdata${TPUT_RESET}
1231
1232
1233
END
1224
-echo >&2 -e "Uninstall script generated: ${COLOR_YELLOW}${COLOR_BOLD}./netdata-uninstaller.sh${COLOR_RESET}"
1234
+echo >&2 "Uninstall script generated: ${TPUT_YELLOW}${TPUT_BOLD}./netdata-uninstaller.sh${TPUT_RESET}"
1235
1236
if [ -d .git ]
1237
then
@@ -1337,7 +1347,7 @@ update && exit 0
1347
REINSTALL
1348
chmod 755 netdata-updater.sh.new
1349
mv -f netdata-updater.sh.new netdata-updater.sh
1340
- echo >&2 -e "Update script generated : ${COLOR_YELLOW}${COLOR_BOLD}./netdata-updater.sh${COLOR_RESET}"
1350
+ echo >&2 "Update script generated : ${TPUT_YELLOW}${TPUT_BOLD}./netdata-updater.sh${TPUT_RESET}"
1351
elif [ -f "netdata-updater.sh" ]
1352
then
1353
rm "netdata-updater.sh"