add ttyd support

This commit is contained in:
Tobias Powalowski 2023-07-07 10:19:09 +02:00
parent 3abd5ababe
commit 0cb9db8072
3 changed files with 14 additions and 1 deletions

View file

@ -33,6 +33,7 @@ build ()
add_symlink /etc/systemd/system/multi-user.target.wants/sshd.service /usr/lib/systemd/system/sshd.service
# start ttyd on startup
add_file /usr/lib/libwebsockets-evlib_uv.so
add_file /usr/share/archboot/remote/usr/bin/ttyd.sh /usr/bin/ttyd.sh
add_file /usr/share/archboot/remote/etc/systemd/system/ttyd.service /etc/systemd/system/ttyd.service
add_symlink /etc/systemd/system/multi-user.target.wants/ttyd.service /etc/systemd/system/ttyd.service
# fix licenses

View file

@ -7,7 +7,7 @@ After=syslog.target
After=network.target
[Service]
ExecStart=/usr/bin/ttyd bash
ExecStart=/usr/bin/ttyd ttyd.sh
Type=simple
Restart=always
User=root

View file

@ -0,0 +1,12 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: GPL-2.0-only
# Created by Tobias Powalowski <tpowa@archlinux.org>
# simulate login from tty
if ! [[ /tmp/.ttyd ]]; then
cat /etc/motd
echo -e "Hit \e[1m\e[92mENTER\e[m for \e[1mshell\e[m login."
read
: >/tmp.ttyd
fi
screen -q -R