mirror of
https://github.com/fairyglade/ly.git
synced 2025-12-20 19:24:53 +00:00
Tidy up runit service scripts (#479)
* Fix the script installation path (install everything only on /etc/sv/ly) * Update the runit scripts to get the TTY value from the /etc/ly/config.ini file * Update readme.md
This commit is contained in:
@@ -8,7 +8,5 @@ fi
|
||||
BAUD_RATE=38400
|
||||
TERM_NAME=linux
|
||||
|
||||
StandardInput=tty
|
||||
TTYPath=/dev/tty2
|
||||
TTYReset=yes
|
||||
TTYVHangup=yes
|
||||
auxtty=$(/bin/cat /etc/ly/config.ini 2>/dev/null 1| /bin/sed -n 's/\(^[[:space:]]*tty[[:space:]]*=[[:space:]]*\)\([[:digit:]][[:digit:]]*\)\(.*\)/\2/p')
|
||||
TTY=tty${auxtty:-2}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
tty=${PWD##*-}
|
||||
exec utmpset -w $tty
|
||||
[ -r conf ] && . ./conf
|
||||
|
||||
exec utmpset -w ${TTY}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
tty=${PWD##*-}
|
||||
|
||||
[ -r conf ] && . ./conf
|
||||
|
||||
if [ -x /sbin/getty -o -x /bin/getty ]; then
|
||||
@@ -12,4 +10,4 @@ elif [ -x /sbin/agetty -o -x /bin/agetty ]; then
|
||||
GETTY=agetty
|
||||
fi
|
||||
|
||||
exec setsid ${GETTY} ${GETTY_ARGS} -nl /usr/bin/ly tty2 "${BAUD_RATE}" "${TERM_NAME}"
|
||||
exec setsid ${GETTY} ${GETTY_ARGS} -nl /usr/bin/ly "${TTY}" "${BAUD_RATE}" "${TERM_NAME}"
|
||||
|
||||
Reference in New Issue
Block a user