light : install service files by init

This commit is contained in:
Victor Tebar
2023-11-03 20:34:05 +00:00
parent e76c6e2cf0
commit 7f17c4ad74
2 changed files with 7 additions and 2 deletions

View File

@@ -1,4 +1,4 @@
light-1.2.2-2
light-1.2.2-3
drwxr-xr-x root/root etc/
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/light

View File

@@ -3,7 +3,7 @@
name=light
version=1.2.2
release=2
release=3
source="$name-$version.tar.gz::https://github.com/haikarainen/light/archive/v$version.tar.gz
run.lightd
finish.lightd
@@ -20,10 +20,15 @@ build() {
make
make DESTDIR=$PKG install
_runit() {
# runit service
install -Dm755 $SRC/run.lightd $PKG/etc/sv/lightd/run
install -Dm755 $SRC/finish.lightd $PKG/etc/sv/lightd/finish
ln -s /run/runit/supervise.lightd $PKG/etc/sv/lightd/supervise
}
_sysv() {
# rc service
install -Dm755 $SRC/rc.$name $PKG/etc/rc.d/$name
}
scratch isinstalled runit && _runit || _sysv
}