Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@
- Handle problematic repo configuration states in kickstart. ([#21226](https://github.com/netdata/netdata/issues/21226))
- Extend code signing in Windows CI to cover drivers. ([#21242](https://github.com/netdata/netdata/issues/21242))
- Check metric count during journal creation ([#21238](https://github.com/netdata/netdata/issues/21238))
- Switch to git-cliff for changelog generation. ([#21218](https://github.com/netdata/netdata/issues/21218))
- WebSocket: Increase inactivity timeout from 5 to 30 minutes ([#21244](https://github.com/netdata/netdata/issues/21244))
- Chore(go.d): add prefix-based func registration ([#21245](https://github.com/netdata/netdata/issues/21245))
- Fix(uninstaller): define rm_file before first use ([#21246](https://github.com/netdata/netdata/issues/21246))

## [2.7.0] - 2025-09-25

Expand Down Expand Up @@ -1811,7 +1815,7 @@
- Fix(go.d): correct unlockall impl ([#19154](https://github.com/netdata/netdata/issues/19154))
- Fix(go.d): correct sd dir ([#19155](https://github.com/netdata/netdata/issues/19155))
- Fix(build): fix building go.d on 32bit ([#19156](https://github.com/netdata/netdata/issues/19156))
- Streaming improvements #1 ([#19137](https://github.com/netdata/netdata/issues/19137))
- Streaming [#1](https://github.com/netdata/netdata/issues/1) ([#19137](https://github.com/netdata/netdata/issues/19137))
- NET Framework metadata (Windows.plugin Part 1) ([#19158](https://github.com/netdata/netdata/issues/19158))
- Regenerate integrations docs ([#19161](https://github.com/netdata/netdata/issues/19161))
- Docs: edit Authentication and Authorization section ([#19160](https://github.com/netdata/netdata/issues/19160))
Expand Down Expand Up @@ -2057,7 +2061,7 @@
- Remove python ceph collector implementation ([#18584](https://github.com/netdata/netdata/issues/18584))
- Port Ceph collector to Go ([#18582](https://github.com/netdata/netdata/issues/18582))
- Regenerate integrations.js ([#18627](https://github.com/netdata/netdata/issues/18627))
- Go.d/ceph: fix leftovers after #18582 ([#18628](https://github.com/netdata/netdata/issues/18628))
- Go.d/ceph: fix leftovers [#18582](https://github.com/netdata/netdata/issues/18582) ([#18628](https://github.com/netdata/netdata/issues/18628))
- Go.d/postgres: fix checkpoints query for postgres 17 ([#18629](https://github.com/netdata/netdata/issues/18629))
- Regenerate integrations.js ([#18630](https://github.com/netdata/netdata/issues/18630))
- Go.d pkg/socket: keep only one timeout option ([#18633](https://github.com/netdata/netdata/issues/18633))
Expand Down
196 changes: 98 additions & 98 deletions packaging/installer/netdata-uninstaller.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,104 @@ cleanup_data_and_config() {
rm_dir "${NETDATA_PREFIX}/etc/netdata"
}

setup_terminal() {
TPUT_RESET=""
TPUT_YELLOW=""
TPUT_WHITE=""
TPUT_BGRED=""
TPUT_BGGREEN=""
TPUT_BOLD=""
TPUT_DIM=""

# Is stderr on the terminal? If not, then fail
test -t 2 || return 1

if command -v tput 1> /dev/null 2>&1; then
if [ $(($(tput colors 2> /dev/null))) -ge 8 ]; then
# Enable colors
TPUT_RESET="$(tput sgr 0)"
TPUT_YELLOW="$(tput setaf 3)"
TPUT_WHITE="$(tput setaf 7)"
TPUT_BGRED="$(tput setab 1)"
TPUT_BGGREEN="$(tput setab 2)"
TPUT_BOLD="$(tput bold)"
TPUT_DIM="$(tput dim)"
fi
fi

return 0
}
setup_terminal || echo > /dev/null

ESCAPED_PRINT_METHOD=
if printf "%s " test > /dev/null 2>&1; then
ESCAPED_PRINT_METHOD="printfq"
fi
escaped_print() {
if [ "${ESCAPED_PRINT_METHOD}" = "printfq" ]; then
printf "%s " "${@}"
else
printf "%s" "${*}"
fi
return 0
}

run_logfile="/dev/null"
run() {
user="${USER--}"
dir="${PWD}"

if [ "$(id -u)" = "0" ]; then
info="[root ${dir}]# "
info_console="[${TPUT_DIM}${dir}${TPUT_RESET}]# "
else
info="[${user} ${dir}]$ "
info_console="[${TPUT_DIM}${dir}${TPUT_RESET}]$ "
fi

{
printf "%s" "${info}"
escaped_print "${@}"
printf "%s" " ... "
} >> "${run_logfile}"

printf "%s" "${info_console}${TPUT_BOLD}${TPUT_YELLOW}" >&2
escaped_print >&2 "${@}"
printf "%s\n" "${TPUT_RESET}" >&2

"${@}"

ret=$?
if [ ${ret} -ne 0 ]; then
printf >&2 "%s FAILED %s\n\n" "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD}" "${TPUT_RESET}"
printf >> "${run_logfile}" "FAILED with exit code %s\n" "${ret}"
NETDATA_WARNINGS="${NETDATA_WARNINGS}\n - Command \"${*}\" failed with exit code ${ret}."
else
printf >&2 "%s OK %s\n\n" "${TPUT_BGGREEN}${TPUT_WHITE}${TPUT_BOLD}" "${TPUT_RESET}"
printf >> "${run_logfile}" "OK\n"
fi

return ${ret}
}

rm_file() {
FILE="$1"
if [ -f "${FILE}" ]; then
if user_input "Do you want to delete this file '$FILE' ? "; then
run rm -v "${FILE}"
fi
fi
}

rm_dir() {
DIR="$1"
if [ -n "$DIR" ] && [ -d "$DIR" ]; then
if user_input "Do you want to delete this directory '$DIR' ? "; then
run rm -v -f -R "${DIR}"
fi
fi
}

detect_existing_install
disable_updater

Expand Down Expand Up @@ -374,86 +472,6 @@ service() {

# -----------------------------------------------------------------------------

setup_terminal() {
TPUT_RESET=""
TPUT_YELLOW=""
TPUT_WHITE=""
TPUT_BGRED=""
TPUT_BGGREEN=""
TPUT_BOLD=""
TPUT_DIM=""

# Is stderr on the terminal? If not, then fail
test -t 2 || return 1

if command -v tput 1> /dev/null 2>&1; then
if [ $(($(tput colors 2> /dev/null))) -ge 8 ]; then
# Enable colors
TPUT_RESET="$(tput sgr 0)"
TPUT_YELLOW="$(tput setaf 3)"
TPUT_WHITE="$(tput setaf 7)"
TPUT_BGRED="$(tput setab 1)"
TPUT_BGGREEN="$(tput setab 2)"
TPUT_BOLD="$(tput bold)"
TPUT_DIM="$(tput dim)"
fi
fi

return 0
}
setup_terminal || echo > /dev/null

ESCAPED_PRINT_METHOD=
if printf "%s " test > /dev/null 2>&1; then
ESCAPED_PRINT_METHOD="printfq"
fi
escaped_print() {
if [ "${ESCAPED_PRINT_METHOD}" = "printfq" ]; then
printf "%s " "${@}"
else
printf "%s" "${*}"
fi
return 0
}

run_logfile="/dev/null"
run() {
user="${USER--}"
dir="${PWD}"

if [ "$(id -u)" = "0" ]; then
info="[root ${dir}]# "
info_console="[${TPUT_DIM}${dir}${TPUT_RESET}]# "
else
info="[${user} ${dir}]$ "
info_console="[${TPUT_DIM}${dir}${TPUT_RESET}]$ "
fi

{
printf "%s" "${info}"
escaped_print "${@}"
printf "%s" " ... "
} >> "${run_logfile}"

printf "%s" "${info_console}${TPUT_BOLD}${TPUT_YELLOW}" >&2
escaped_print >&2 "${@}"
printf "%s\n" "${TPUT_RESET}" >&2

"${@}"

ret=$?
if [ ${ret} -ne 0 ]; then
printf >&2 "%s FAILED %s\n\n" "${TPUT_BGRED}${TPUT_WHITE}${TPUT_BOLD}" "${TPUT_RESET}"
printf >> "${run_logfile}" "FAILED with exit code %s\n" "${ret}"
NETDATA_WARNINGS="${NETDATA_WARNINGS}\n - Command \"${*}\" failed with exit code ${ret}."
else
printf >&2 "%s OK %s\n\n" "${TPUT_BGGREEN}${TPUT_WHITE}${TPUT_BOLD}" "${TPUT_RESET}"
printf >> "${run_logfile}" "OK\n"
fi

return ${ret}
}

portable_del_group() {
groupname="${1}"

Expand Down Expand Up @@ -622,24 +640,6 @@ quit_msg() {
fi
}

rm_file() {
FILE="$1"
if [ -f "${FILE}" ]; then
if user_input "Do you want to delete this file '$FILE' ? "; then
run rm -v "${FILE}"
fi
fi
}

rm_dir() {
DIR="$1"
if [ -n "$DIR" ] && [ -d "$DIR" ]; then
if user_input "Do you want to delete this directory '$DIR' ? "; then
run rm -v -f -R "${DIR}"
fi
fi
}

safe_pidof() {
pidof_cmd="$(command -v pidof 2> /dev/null)"
if [ -n "${pidof_cmd}" ]; then
Expand Down
2 changes: 1 addition & 1 deletion packaging/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.7.0-181-nightly
v2.7.0-192-nightly