mirror of
https://github.com/openwrt/packages.git
synced 2025-12-26 13:26:17 +04:00
unbound: Rewrite init script to use procd
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
#Copyright (C) 2010 Ondrej Caletka <o.caletka@sh.cvut.cz>
|
||||
# Copyright (C) 2016 Michael Hanselmann
|
||||
|
||||
START=61
|
||||
|
||||
start () {
|
||||
unbound
|
||||
}
|
||||
USE_PROCD=1
|
||||
|
||||
stop () {
|
||||
PIDFILE='/var/run/unbound.pid'
|
||||
if [ -f $PIDFILE ] ; then
|
||||
kill $(cat $PIDFILE)
|
||||
fi
|
||||
start_service() {
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/sbin/unbound
|
||||
procd_append_param command -d # don't daemonize
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user