mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
add ttyd support
This commit is contained in:
parent
3abd5ababe
commit
0cb9db8072
3 changed files with 14 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
12
usr/share/archboot/remote/usr/bin/ttyd.sh
Executable file
12
usr/share/archboot/remote/usr/bin/ttyd.sh
Executable 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
|
Loading…
Reference in a new issue