diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2025-01-05 19:07:34 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2025-01-05 19:07:34 -0300 |
commit | 1e56208aebdb4dc81ab16042208861901490bd5b (patch) | |
tree | 1a5ede76dc40b28068d7545f1a61cf5f64029c0c /shell | |
parent | 5133cabd9e7765953761dd9b1a1529f09b5133e8 (diff) | |
download | termplex-1e56208aebdb4dc81ab16042208861901490bd5b.tar.gz termplex-1e56208aebdb4dc81ab16042208861901490bd5b.tar.bz2 |
Diffstat (limited to 'shell')
-rwxr-xr-x | shell | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -45,16 +45,17 @@ function shell_remote_multiplexer { # Default tmux command tmux="tmux attach" - # Common socket version - if [ ! -z "$1" ]; then - tmux="tmux attach -t $1" - fi + # Version with a common socket + #if [ ! -z "$1" ]; then + # tmux="tmux attach -t $1" + #fi + # Version with a separate socket # Ensure there's a separate server running for each session. # Check wscreen for details - #if [ ! -z "$1" ]; then - # tmux="tmux attach -L${1} -t $1" - #fi + if [ ! -z "$1" ]; then + tmux="tmux -L${1} attach -t $1" + fi echo "$SUDO $tmux || $SUDO screen -x $1" } @@ -79,9 +80,9 @@ if [ "$BASENAME" == "shells" ]; then # Remote screen shell using $AUTOSSH if [ "$COMMAND" == "root" ]; then SUDO="sudo" - $AUTOSSH $DEST -t -- "`shell_remote_multiplexer`" + $AUTOSSH $DEST -t -- "`shell_remote_multiplexer $COMMAND`" else - $AUTOSSH $DEST -t -- "`shell_remote_multiplexer` $COMMAND $*" + $AUTOSSH $DEST -t -- "`shell_remote_multiplexer $COMMAND` $COMMAND $*" fi else if [ -z "$COMMAND" ] && shell_${LOCAL_MULTIPLEXER}_ls $DEST; then |