ncp-dist-upgrade: Write dist-upgrade logs to disk

Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com>
This commit is contained in:
Tobias K 2024-05-02 12:01:52 +02:00
parent 96b2c19823
commit 8da59ef850
No known key found for this signature in database
GPG Key ID: 44FD368932E645C1

View File

@ -22,7 +22,7 @@ fi
if { [ "$TERM" = "screen" ] && [ -n "$TMUX" ]; } || [[ "${DEBIAN_FRONTEND:-}" == "noninteractive" ]] || ! [[ -t 0 ]]
then
"${UPGRADE_CMD[@]}"
"${UPGRADE_CMD[@]}" |& tee /var/log/ncp-dist-upgrade.log
else
tmux list-sessions | grep ncp-distupgrade && {
echo "Existing distupgrade process detected. Connecting..."
@ -30,6 +30,6 @@ else
tmux attach -t ncp-distupgrade
exit 0
}
tmux new-session -s ncp-distupgrade bash -c "${UPGRADE_CMD[*]}; bash"
tmux new-session -s ncp-distupgrade bash -c "${UPGRADE_CMD[*]} |& tee /var/log/ncp-dist-upgrade.log; bash"
fi