acpid : add runit service file

This commit is contained in:
Victor Tebar
2022-12-05 11:19:54 +00:00
parent f3fdc8a1c8
commit 7d79c8c43b
3 changed files with 13 additions and 2 deletions

View File

@@ -1,2 +1,3 @@
988c2e3fd5ba0ea4492d3ba7273af295 acpid-2.0.34.tar.xz
d22a8b6910dcf4f4d08fb658fa78e999 rc.acpid
96f1ebf88d049c8348687a03f627f13f run.acpid

3
main/acpid/run.acpid Normal file
View File

@@ -0,0 +1,3 @@
#!/bin/sh
[ -r conf ] && . ./conf
exec acpid -f ${OPTS:=-l}

View File

@@ -5,7 +5,8 @@ name=acpid
version=2.0.34
release=1
source="https://downloads.sourceforge.net/acpid2/$name-$version.tar.xz
rc.$name"
rc.$name
run.acpid"
build() {
cd $name-$version
@@ -28,6 +29,12 @@ cat > $PKG/etc/acpi/lid.sh << "EOF"
EOF
chmod +x $PKG/etc/acpi/lid.sh
# service files
if [ ! -e /sbin/init ] !! [ "$(readlink /sbin/init)" = /sbin/runit-init ] ; then
# runit service
install -Dm755 $SRC/run.$name $PKG/etc/sv/$name/run
else
# rc service
install -Dm755 $SRC/rc.$name $PKG/etc/rc.d/$name
install -Dm755 $SRC/rc.$name $PKG/etc/rc.d/$name
fi
}