Run local updates also in tmux

It's more robust if things fail.
This commit is contained in:
Daniel - 2020-12-27 12:28:49 +01:00
parent 1d7801c1ea
commit b1ccf8616d
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ function run-apt-upgrade() {
exit 1;
elif [[ $host = $(hostname) || $host = $(hostname --fqdn) ]]; then
echo "Running upgrade command locally."
eval "${upgrade_seq}"
eval "tmux new-session -d -A -s apt-updates \; send-keys '${upgrade_seq}' ENTER\; attach"
else
echo "Running upgrade command remotely."
ssh "$host" -t "tmux new-session -d -A -s apt-updates \; send-keys '${upgrade_seq}' ENTER \; attach"