1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/netdata_ynh.git synced 2024-09-03 19:46:33 +02:00

Update remove: simplify unecessary file descriptor magic...

This commit is contained in:
Alexandre Aubin 2024-01-06 20:18:42 +01:00 committed by GitHub
parent 470c5c61fc
commit e3fd4e5447
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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