summaryrefslogtreecommitdiffstats
path: root/packaging/installer/kickstart.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/installer/kickstart.sh')
-rwxr-xr-xpackaging/installer/kickstart.sh13
1 files changed, 6 insertions, 7 deletions
diff --git a/packaging/installer/kickstart.sh b/packaging/installer/kickstart.sh
index 2d793eafd..0ddd750be 100755
--- a/packaging/installer/kickstart.sh
+++ b/packaging/installer/kickstart.sh
@@ -414,6 +414,7 @@ success_banner() {
cleanup() {
if [ -z "${NO_CLEANUP}" ] && [ -n "${tmpdir}" ]; then
cd || true
+ DRY_RUN=0
run_as_root rm -rf "${tmpdir}"
fi
}
@@ -684,7 +685,7 @@ get_system_info() {
DISTRO_COMPAT_NAME="opensuse"
SYSVERSION="tumbleweed"
;;
- cloudlinux|almalinux|rocky|rhel)
+ cloudlinux|almalinux|centos-stream|rocky|rhel)
DISTRO_COMPAT_NAME="centos"
;;
artix|manjaro|obarun)
@@ -814,7 +815,7 @@ uninstall() {
FLAGS="--yes"
fi
- if [ -x "${uninstaller}" ]; then
+ if run_as_root test -x "${uninstaller}"; then
if [ "${DRY_RUN}" -eq 1 ]; then
progress "Would attempt to uninstall existing install with uninstaller script found at: ${uninstaller}"
return 0
@@ -880,9 +881,8 @@ detect_existing_install() {
if [ -n "${ndprefix}" ]; then
typefile="${ndprefix}/etc/netdata/.install-type"
if [ -r "${typefile}" ]; then
- run_as_root sh -c "cat \"${typefile}\" > \"${tmpdir}/install-type\""
# shellcheck disable=SC1090,SC1091
- . "${tmpdir}/install-type"
+ . "${typefile}"
else
INSTALL_TYPE="unknown"
fi
@@ -890,9 +890,8 @@ detect_existing_install() {
envfile="${ndprefix}/etc/netdata/.environment"
if [ "${INSTALL_TYPE}" = "unknown" ] || [ "${INSTALL_TYPE}" = "custom" ]; then
if [ -r "${envfile}" ]; then
- run_as_root sh -c "cat \"${envfile}\" > \"${tmpdir}/environment\""
- # shellcheck disable=SC1091
- . "${tmpdir}/environment"
+ # shellcheck disable=SC1090,SC1091
+ . "${envfile}"
if [ -n "${NETDATA_IS_STATIC_INSTALL}" ]; then
if [ "${NETDATA_IS_STATIC_INSTALL}" = "yes" ]; then
INSTALL_TYPE="legacy-static"