From 28945ea398007951ef872a8d133b946cd879d5bd Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Fri, 10 Jun 2016 22:46:08 +0200 Subject: [PATCH] unbound: Rewrite init script to use procd Signed-off-by: Michael Hanselmann --- net/unbound/Makefile | 2 +- net/unbound/files/unbound.init | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/net/unbound/Makefile b/net/unbound/Makefile index e5fbe43a26..e88c11e581 100644 --- a/net/unbound/Makefile +++ b/net/unbound/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=unbound PKG_VERSION:=1.5.9 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_LICENSE:=BSD-3-Clause PKG_LICENSE_FILES:=LICENSE diff --git a/net/unbound/files/unbound.init b/net/unbound/files/unbound.init index 4e700e4458..8c1304e2dd 100755 --- a/net/unbound/files/unbound.init +++ b/net/unbound/files/unbound.init @@ -1,14 +1,14 @@ #!/bin/sh /etc/rc.common -#Copyright (C) 2010 Ondrej Caletka +# 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 }