same layout on ssh and ttyd login

This commit is contained in:
Tobias Powalowski 2024-04-16 18:43:20 +02:00
parent 17a4c97587
commit c030d1793d

View file

@ -4,8 +4,12 @@
# simulate login from tty on first screen session
if ! screen -ls &>/dev/null; then
[[ -z "${SSH_TTY}" ]] && cat /etc/motd
clear
echo -e "\e[1mLogin on ttyd | $(uname -m) | $(uname -r) | $(date)\e[m"
echo ""
cat /etc/motd
echo -e "Hit \e[1m\e[92mENTER\e[m for \e[1mshell\e[m login."
echo ""
read -r
fi
# define /bin/bash, else /bin/sh is the screen default