Run local updates also in tmux
It's more robust if things fail.
This commit is contained in:
parent
1d7801c1ea
commit
b1ccf8616d
|
@ -23,7 +23,7 @@ function run-apt-upgrade() {
|
||||||
exit 1;
|
exit 1;
|
||||||
elif [[ $host = $(hostname) || $host = $(hostname --fqdn) ]]; then
|
elif [[ $host = $(hostname) || $host = $(hostname --fqdn) ]]; then
|
||||||
echo "Running upgrade command locally."
|
echo "Running upgrade command locally."
|
||||||
eval "${upgrade_seq}"
|
eval "tmux new-session -d -A -s apt-updates \; send-keys '${upgrade_seq}' ENTER\; attach"
|
||||||
else
|
else
|
||||||
echo "Running upgrade command remotely."
|
echo "Running upgrade command remotely."
|
||||||
ssh "$host" -t "tmux new-session -d -A -s apt-updates \; send-keys '${upgrade_seq}' ENTER \; attach"
|
ssh "$host" -t "tmux new-session -d -A -s apt-updates \; send-keys '${upgrade_seq}' ENTER \; attach"
|
||||||
|
|
Loading…
Reference in New Issue