From e3fd4e5447581935f928ba68e3b441e889733df2 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin <4533074+alexAubin@users.noreply.github.com> Date: Sat, 6 Jan 2024 20:18:42 +0100 Subject: [PATCH] Update remove: simplify unecessary file descriptor magic... --- scripts/remove | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scripts/remove b/scripts/remove index 25701bc..c0fd58f 100644 --- a/scripts/remove +++ b/scripts/remove @@ -39,16 +39,11 @@ chmod +x $tmpdir/$UNINSTALL_SCRIPT # Move outside the directory (which will be removed) pushd $tmpdir - # create a temporary file for the log - tmp=$(mktemp /tmp/netdata-uninstaller-log-XXXXXX.log) - # open fd 3 and send it to tmp - exec 3>${tmp} + # create a temporary file for the log + tmplog=$(mktemp /tmp/netdata-uninstaller-log-XXXXXX.log) - # Execute the uninstall script - ./${UNINSTALL_SCRIPT} --yes --force --env $install_dir/etc/netdata/.environment >&3 2>&3 - - # close fd 3 - exec 3<&- + # Execute the uninstall script + ./${UNINSTALL_SCRIPT} --yes --force --env $install_dir/etc/netdata/.environment >$tmplog 2>$tmplog popd # Remove MySQL netdata user