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 SCRIPTEXIT
# Start tmux if not defined as STARTTMUX in bashrc # 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 if ${STARTTMUX-$STARTTMUXDEFAULT} ; then
cat << EOF cat << EOF

View file

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