-chmod 755 netdata-updater.sh.new
-mv -f netdata-updater.sh.new netdata-updater.sh
-echo >&2 "Update script generated : ./netdata-updater.sh"
+ chmod 755 netdata-updater.sh.new
+ mv -f netdata-updater.sh.new netdata-updater.sh
+ echo >&2 "Update script generated : ${TPUT_GREEN}${TPUT_BOLD}./netdata-updater.sh${TPUT_RESET}"
+ echo >&2
+ echo >&2 "${TPUT_DIM}${TPUT_BOLD}netdata-updater.sh${TPUT_RESET}${TPUT_DIM} can work from cron. It will trigger an email from cron"
+ echo >&2 "only if it fails (it does not print anything if it can update netdata).${TPUT_RESET}"
+ if [ "${UID}" -eq 0 -a -d "/etc/cron.daily" -a ! -f "/etc/cron.daily/netdata-updater.sh" ]
+ then
+ echo >&2 "${TPUT_DIM}Run this to automatically check and install netdata updates once per day:${TPUT_RESET}"
+ echo >&2
+ echo >&2 "${TPUT_YELLOW}${TPUT_BOLD}ln -s ${PWD}/netdata-updater.sh /etc/cron.daily/netdata-updater.sh${TPUT_RESET}"
+ fi
+elif [ -f "netdata-updater.sh" ]
+ then
+ rm "netdata-updater.sh"
+fi
+
+# -----------------------------------------------------------------------------
+echo >&2
+progress "We are done!"
+
+if [ ${started} -eq 1 ]
+ then
+ netdata_banner "is installed and running now!"
+else
+ netdata_banner "is installed now!"
+fi
+
+echo >&2 " enjoy real-time performance and health monitoring..."
+echo >&2
+exit 0