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

Update upgrade: simplify unecessary file descriptor magic...

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

View file

@ -41,17 +41,12 @@ then
[ ! -z "${pids}" ] && kill -USR1 ${pids}
# create a temporary file for the log
tmp=$(mktemp /tmp/netdata-updater-log-XXXXXX.log)
# open fd 3 and send it to tmp
exec 3>${tmp}
tmplog=$(mktemp /tmp/netdata-updater-log-XXXXXX.log)
# Launch netdata installation in /opt directory
pushd $NETDATA_TMPDIR
./netdata-installer.sh --install-prefix /opt --dont-wait --disable-cloud >&3 2>&3 || ynh_die "FAILED TO COMPILE/INSTALL NETDATA"
./netdata-installer.sh --install-prefix /opt --dont-wait --disable-cloud >$tmplog 2>$tmplog || ynh_die "FAILED TO COMPILE/INSTALL NETDATA"
popd
# close fd 3
exec 3<&-
fi
# Specific configuration