OpenRC script

This commit is contained in:
MadcowOG 2022-07-07 15:43:02 -07:00
parent 3556e39374
commit f05252ec77
1 changed files with 28 additions and 0 deletions

28
res/ly-openrc Normal file
View File

@ -0,0 +1,28 @@
#! /sbin/openrc-run
name="ly"
description="TUI Display Manager"
supervisor=supervise-daemon
respawn-period=60
pidfile=/run/"${RC_SVCNAME}.pid"
depend() {
after agetty
}
start() {
TTY=tty2
BAUD=38400
TERM=linux
if [ -x /sbin/getty -o -x /bin/getty ];
then
GETTY=/sbin/getty
elif [ -x /sbin/getty -o -x /bin/getty ];
then
GETTY=/sbin/agetty
fi
exec setsid ${GETTY} -nl /usr/bin/ly "${TTY}" "${BAUD}" "${TERM}"
}