Login MOTD will now display in first shell of a new session
by printing /var/run/motd.dynamic to terminal befor running ZSH
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" = "" ]; then
|
||||
tmux has-session -t $(tty | sed 's/^.....//') 2>/dev/null
|
||||
if [ $? != 0 ]; then
|
||||
exec tmux new-session -s $(tty | sed 's/^.....//')
|
||||
exec tmux new-session -s $(tty | sed 's/^.....//') "cat /var/run/motd.dynamic;zsh"
|
||||
else
|
||||
exec tmux attach-session -t $(tty | sed 's/^.....//')
|
||||
fi
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
if [[ -z "$TMUX" ]] && [ "$SSH_CONNECTION" != "" ]; then
|
||||
tmux has-session -t remote 2>/dev/null
|
||||
if [ $? != 0 ]; then
|
||||
exec tmux new-session -s remote
|
||||
exec tmux new-session -s remote "cat /var/run/motd.dynamic;zsh"
|
||||
else
|
||||
exec tmux attach-session -t remote
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user