unbound: Rewrite init script to use procd

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
This commit is contained in:
Michael Hanselmann 2016-06-10 22:46:08 +02:00
parent e21d81209c
commit 28945ea398
2 changed files with 10 additions and 10 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=unbound PKG_NAME:=unbound
PKG_VERSION:=1.5.9 PKG_VERSION:=1.5.9
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_LICENSE:=BSD-3-Clause PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE PKG_LICENSE_FILES:=LICENSE

View File

@ -1,14 +1,14 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
#Copyright (C) 2010 Ondrej Caletka <o.caletka@sh.cvut.cz> # Copyright (C) 2016 Michael Hanselmann
START=61 START=61
start () { USE_PROCD=1
unbound
}
stop () { start_service() {
PIDFILE='/var/run/unbound.pid' procd_open_instance
if [ -f $PIDFILE ] ; then procd_set_param command /usr/sbin/unbound
kill $(cat $PIDFILE) procd_append_param command -d # don't daemonize
fi procd_set_param respawn
procd_close_instance
} }