fix local and remote start of tmux
This commit is contained in:
parent
5f9db11400
commit
84be8e371c
3 changed files with 5 additions and 4 deletions
|
@ -11,7 +11,6 @@
|
||||||
|
|
||||||
# set some variables to defaults, if not set in .bashrc
|
# set some variables to defaults, if not set in .bashrc
|
||||||
[ -z ${SSHS+x} ] && export SSHS=false
|
[ -z ${SSHS+x} ] && export SSHS=false
|
||||||
[ -z ${STARTTMUX+x} ] && export STARTTMUX=false
|
|
||||||
|
|
||||||
# check if we are a interactive shell
|
# check if we are a interactive shell
|
||||||
# https://guide.bash.academy/expansions/
|
# https://guide.bash.academy/expansions/
|
||||||
|
@ -204,8 +203,8 @@ EOF
|
||||||
SCRIPTEXIT
|
SCRIPTEXIT
|
||||||
|
|
||||||
# Start tmux if not defined as STARTTMUX in bashrc
|
# Start tmux if not defined as STARTTMUX in bashrc
|
||||||
logdebug "start tmux ${STARTTMUXDEFAULT} - ${STARTTMUXDEFAULT-$STARTTMUX}"
|
logdebug "start tmux ${STARTTMUXDEFAULT} - ${STARTTMUXDEFAULT} - ${STARTTMUXDEFAULT-$STARTTMUX}"
|
||||||
if ${STARTTMUXDEFAULT-$STARTTMUX} ; then
|
if ${STARTTMUX-$STARTTMUXDEFAULT} ; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
"User: $USER - $UID"
|
"User: $USER - $UID"
|
||||||
|
|
|
@ -13,3 +13,5 @@ export MSC_LOGLEVEL_DEFAULT="INFO"
|
||||||
export MSC_FILELOGLEVEL_DEFAULT="DEBUG"
|
export MSC_FILELOGLEVEL_DEFAULT="DEBUG"
|
||||||
export LOGLEVEL_DEFAULT="${MSC_LOGLEVEL_DEFAULT}"
|
export LOGLEVEL_DEFAULT="${MSC_LOGLEVEL_DEFAULT}"
|
||||||
export FILELOGLEVEL_DEFAULT="${MSC_FILELOGLEVEL_DEFAULT}"
|
export FILELOGLEVEL_DEFAULT="${MSC_FILELOGLEVEL_DEFAULT}"
|
||||||
|
export STARTTMUXDEFAULT=false
|
||||||
|
export STARTTMUXREMOTEDEFAULT=true
|
||||||
|
|
|
@ -81,7 +81,7 @@ if ! $SSHS; then
|
||||||
|
|
||||||
# Start tmux if not defined as STARTTMUX in bashrc
|
# Start tmux if not defined as STARTTMUX in bashrc
|
||||||
if test ! $TMUX && test $SSH_TTY && test $TERM != screen && test $(systemctl status tmux@${USER}.service 1>/dev/null 2>&1; echo $? ) -eq 0; then
|
if test ! $TMUX && test $SSH_TTY && test $TERM != screen && test $(systemctl status tmux@${USER}.service 1>/dev/null 2>&1; echo $? ) -eq 0; then
|
||||||
STARTTMUXDEFAULT=true
|
STARTTMUXDEFAULT=${STARTTMUXREMOTEDEFAULT}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset -f pathmunge
|
unset -f pathmunge
|
||||||
|
|
Loading…
Reference in a new issue