From e113de93d6c6c5b1dbf1dcf928492e837ac7e8e0 Mon Sep 17 00:00:00 2001 From: Jiri Slachta Date: Sun, 26 Oct 2014 22:27:30 +0100 Subject: [PATCH] kamailio: fix init script The init script now correctly uses PID files to kill kamailio on stop. Signed-off-by: Jiri Slachta --- net/kamailio-3.3.x/Makefile | 2 +- net/kamailio-3.3.x/files/kamailio.init | 13 +++++++------ net/kamailio-4.1.x/Makefile | 2 +- net/kamailio-4.1.x/files/kamailio.init | 13 +++++++------ 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/net/kamailio-3.3.x/Makefile b/net/kamailio-3.3.x/Makefile index 14291fe..9148071 100644 --- a/net/kamailio-3.3.x/Makefile +++ b/net/kamailio-3.3.x/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kamailio3 PKG_VERSION:=3.3.7 -PKG_RELEASE:=5 +PKG_RELEASE:=6 PKG_SOURCE_URL:=http://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src/ PKG_SOURCE:=kamailio-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz diff --git a/net/kamailio-3.3.x/files/kamailio.init b/net/kamailio-3.3.x/files/kamailio.init index 5a382ae..dae4546 100644 --- a/net/kamailio-3.3.x/files/kamailio.init +++ b/net/kamailio-3.3.x/files/kamailio.init @@ -1,12 +1,13 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2012 OpenWrt.org -START=99 -APP=kamailio -BIN_FILE="/usr/sbin/"$APP -PID_FILE="/var/run/"$APP".pid" +# Copyright (C) 2014 OpenWrt.org + +START=99 + +BIN_FILE=/usr/sbin/kamailio +PID_FILE=/var/run/kamailio.pid start() { - start-stop-daemon -S -x $BIN_FILE -p $PID_FILE -b -m + start-stop-daemon -S -x $BIN_FILE -b -- -P $PID_FILE } stop() { diff --git a/net/kamailio-4.1.x/Makefile b/net/kamailio-4.1.x/Makefile index 652f685..f9a6337 100644 --- a/net/kamailio-4.1.x/Makefile +++ b/net/kamailio-4.1.x/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=kamailio4 PKG_VERSION:=4.1.6 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE_URL:=http://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src/ PKG_SOURCE:=kamailio-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz diff --git a/net/kamailio-4.1.x/files/kamailio.init b/net/kamailio-4.1.x/files/kamailio.init index 5a382ae..dae4546 100644 --- a/net/kamailio-4.1.x/files/kamailio.init +++ b/net/kamailio-4.1.x/files/kamailio.init @@ -1,12 +1,13 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2012 OpenWrt.org -START=99 -APP=kamailio -BIN_FILE="/usr/sbin/"$APP -PID_FILE="/var/run/"$APP".pid" +# Copyright (C) 2014 OpenWrt.org + +START=99 + +BIN_FILE=/usr/sbin/kamailio +PID_FILE=/var/run/kamailio.pid start() { - start-stop-daemon -S -x $BIN_FILE -p $PID_FILE -b -m + start-stop-daemon -S -x $BIN_FILE -b -- -P $PID_FILE } stop() { -- 2.30.2