add debug

This commit is contained in:
Jakobus Schürz 2021-02-07 21:26:14 +01:00
parent 61c600ffbf
commit 7fe196faea
2 changed files with 18 additions and 7 deletions

View file

@ -203,7 +203,7 @@ EOF
SCRIPTEXIT
# Start tmux if not defined as STARTTMUX in bashrc
logdebug "start tmux ${STARTTMUXDEFAULT} - ${STARTTMUXDEFAULT} - ${STARTTMUXDEFAULT-$STARTTMUX}"
logdebug "start tmux ${STARTTMUXDEFAULT} - ${STARTTMUXREMOTEDEFAULT} - ${STARTTMUX-$STARTTMUXDEFAULT}"
if ${STARTTMUX-$STARTTMUXDEFAULT} ; then
cat << EOF

View file

@ -86,13 +86,24 @@ if ! $SSHS; then
logwarn "SSH_TTY: $SSH_TTY"
logwarn "TERM: $TERM"
logwarn "tmux@${USER}: $(systemctl status tmux@${USER}.service 1>/dev/null 2>&1; echo $? )"
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=${STARTTMUXREMOTEDEFAULT}
logwarn "TEST1"
else
logwarn "TEST2"
STARTTMUXDEFAULT=${STARTTMUXREMOTEDEFAULT}
if test $SSH_TTY; then
logwarn "im remote"
if test ! $TMUX && $TERM != screen; then
logwarn "no screen"
if test $(systemctl status tmux@${USER}.service 1>/dev/null 2>&1; echo $? ) -eq 0; then
logwarn "tmux@${USER} is running"
STARTTMUXDEFAULT=${STARTTMUXREMOTEDEFAULT}
fi
fi
fi
# 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=${STARTTMUXREMOTEDEFAULT}
# logwarn "TEST1"
# else
# logwarn "TEST2"
# STARTTMUXDEFAULT=${STARTTMUXREMOTEDEFAULT}
# fi
logwarn "${STARTTMUXDEFAULT}"
unset -f pathmunge