pages:howtos:tmux:runnig_updates_in_tmux
This is an old revision of the document!
Table of Contents
Running Updates In TMUX
I want to make updates to be executed inside a tmux-session to make the update process resilient against interrupted ssh-connections.
- update distribution packages on SUSE and Debian
- update git repositories
- update flatpak packages
- update snap packages
Sources
Implementation
zypper in lsb-release install -bD --owner=root --group=root --mode=0750 -T <(cat << 'EOF' #!/bin/bash # debug set -x declare _osvendor declare _highlevelpackagemanager declare _updatecommand if [ ! command -v lsb-release >/dev/null 2>&1 ] && [ ! command -v lsb_release >/dev/null 2>&1 ] then echo >&2 "ERROR: lsb-release required but it's not installed. Aborting." exit 1; fi _osvendor="$( lsb-release -is )" case $_osvendor in openSUSE) _highlevelpackagemanager="$( command -v zypper )" _updatecommand="${_highlevelpackagemanager} ref && ${_highlevelpackagemanager} dup -y" ;; Debian) _highlevelpackagemanager="$( command -v apt )" _updatecommand="${_highlevelpackagemanager} update && ${_highlevelpackagemanager} -y upgrade && ${_highlevelpackagemanager} -y full-upgrade" ;; *) echo >&2 "ERROR: Your operating system vendor (${_osvendor}) is not supported. Aborting." exit 1 ;; esac tmux new -s sysupdate -d tmux send-keys -t sysupdate "${_updatecommand}" C-m tmux attach -t sysupdate EOF ) /root/scripts/sysupdate/sysupdate ln -s /root/scripts/sysupdate/sysupdate /root/bin/AAA
~~DISCUSSION~~
pages/howtos/tmux/runnig_updates_in_tmux.1649854580.txt.gz · Last modified: 2022/04/13 12:56 by mischerh