dnsmasq : install service files by init

This commit is contained in:
Victor Tebar
2023-11-03 20:31:56 +00:00
parent c3b49a40ec
commit 54a0f191e2
2 changed files with 7 additions and 6 deletions

View File

@@ -1,12 +1,8 @@
dnsmasq-2.89-1
dnsmasq-2.89-2
drwxr-xr-x root/root etc/
-rw-r--r-- root/root etc/dnsmasq.conf.spkgnew
drwxr-xr-x root/root etc/rc.d/
-rwxr-xr-x root/root etc/rc.d/dnsmasq
drwxr-xr-x root/root etc/sv/
drwxr-xr-x root/root etc/sv/dnsmasq/
-rwxr-xr-x root/root etc/sv/dnsmasq/run
lrwxrwxrwx root/root etc/sv/dnsmasq/supervise -> /run/runit/supervise.dnsmasq
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/sbin/
-rwxr-xr-x root/root usr/sbin/dnsmasq

View File

@@ -4,7 +4,7 @@
name=dnsmasq
version=2.89
release=1
release=2
backup="etc/dnsmasq.conf"
source="http://www.thekelleys.org.uk/$name/$name-$version.tar.xz
run.$name
@@ -18,9 +18,14 @@ build() {
install -Dm 644 dnsmasq.conf.example $PKG/etc/dnsmasq.conf
install -Dm 644 trust-anchors.conf $PKG/usr/share/dnsmasq/trust-anchors.conf
_runit() {
# runit service
install -Dm755 $SRC/run.$name $PKG/etc/sv/$name/run
ln -s /run/runit/supervise.$name $PKG/etc/sv/$name/supervise
}
_sysv() {
# rc service
install -Dm755 $SRC/rc.$name $PKG/etc/rc.d/$name
}
scratch isinstalled runit && _runit || _sysv
}