mirror of
https://github.com/javalsai/lidm.git
synced 2025-08-31 02:18:00 +02:00
feat: add runit support
This commit is contained in:
@@ -15,3 +15,4 @@ There are three packages that follow standard conventions:
|
||||
Summary of what to do to install service files anyways:
|
||||
* **systemd:** Copy `assets/services/systemd.service` to `/etc/systemd/system/lidm.service` and enable the service (`systemctl enable lidm`)
|
||||
* **dinit:** Copy `assets/services/dinit` to `/etc/dinit.d/lidm` and enable the service (`dinitctl enable lidm`)
|
||||
* **runit:** Copy `assets/services/runit/` to `/etc/runit/sv/lidm/`, add the service (`ln -s /etc/runit/sv/lidm /run/runit/service`) and enable it (`sv enable lidm`)
|
||||
|
5
assets/services/runit/conf
Executable file
5
assets/services/runit/conf
Executable file
@@ -0,0 +1,5 @@
|
||||
BAUD_RATE=38400
|
||||
TERM_NAME=linux
|
||||
|
||||
TTY=tty7
|
||||
EXEC_PATH=/bin/lidm
|
5
assets/services/runit/finish
Executable file
5
assets/services/runit/finish
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -r conf ] && . ./conf
|
||||
|
||||
exec utmpset -w $TTY
|
15
assets/services/runit/run
Executable file
15
assets/services/runit/run
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -r conf ] && . ./conf
|
||||
|
||||
if [ -x /sbin/getty -o -x /bin/getty ]; then
|
||||
# busybox
|
||||
GETTY=getty
|
||||
elif [ -x /sbin/agetty -o -x /bin/agetty ]; then
|
||||
# util-linux
|
||||
GETTY=agetty
|
||||
fi
|
||||
|
||||
exec setsid ${GETTY} ${GETTY_ARGS} \
|
||||
"${TTY}" "${TERM_NAME}" \
|
||||
-n -l "${EXEC_PATH}" -o 7
|
Reference in New Issue
Block a user