remove output when Session "User" not exist

This commit is contained in:
Jakobus Schürz 2023-01-27 16:42:52 +01:00 committed by Jakobus Schürz
parent 354ed21889
commit cd84947a94

View file

@ -91,8 +91,9 @@ if ! $SSHS; then
if test ! $TMUX && test $TERM != screen; then if test ! $TMUX && test $TERM != screen; then
loginfo "no screen" loginfo "no screen"
# if test $(systemctl status tmux@${USER}.service 1>/dev/null 2>&1; echo $? ) -eq 0; then # if test $(systemctl status tmux@${USER}.service 1>/dev/null 2>&1; echo $? ) -eq 0; then
if tmux has-session -t User || tmux has-session -t "${USER}"; then if tmux has-session -t User > /dev/null || tmux has-session -t "${USER}"; then
loginfo "tmux@${USER} is running" loginfo "tmux@${USER} is running"
loginfo "$(tmux list-sessions)"
STARTTMUXDEFAULT=${STARTTMUXREMOTEDEFAULT} STARTTMUXDEFAULT=${STARTTMUXREMOTEDEFAULT}
fi fi
fi fi