From 8da59ef8503c923ed943034a0c94ffaf8e738714 Mon Sep 17 00:00:00 2001 From: Tobias K <6317548+theCalcaholic@users.noreply.github.com> Date: Thu, 2 May 2024 12:01:52 +0200 Subject: [PATCH] ncp-dist-upgrade: Write dist-upgrade logs to disk Signed-off-by: Tobias K <6317548+theCalcaholic@users.noreply.github.com> --- bin/ncp-dist-upgrade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/ncp-dist-upgrade b/bin/ncp-dist-upgrade index 2721fe89..7c93def9 100755 --- a/bin/ncp-dist-upgrade +++ b/bin/ncp-dist-upgrade @@ -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