kamailio: fix init script
authorJiri Slachta <slachta@cesnet.cz>
Sun, 26 Oct 2014 21:27:30 +0000 (22:27 +0100)
committerJiri Slachta <slachta@cesnet.cz>
Sun, 26 Oct 2014 21:27:30 +0000 (22:27 +0100)
The init script now correctly uses PID files to kill kamailio on stop.

Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
net/kamailio-3.3.x/Makefile
net/kamailio-3.3.x/files/kamailio.init
net/kamailio-4.1.x/Makefile
net/kamailio-4.1.x/files/kamailio.init

index 14291fe..9148071 100644 (file)
@@ -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
index 5a382ae..dae4546 100644 (file)
@@ -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() {
index 652f685..f9a6337 100644 (file)
@@ -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
index 5a382ae..dae4546 100644 (file)
@@ -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() {