Module: sip-router
Branch: 4.1
Commit: 65336def3106a06bd96cf46cd0aaa1883ee65f1c
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=65336de…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: Tue Feb 18 16:30:28 2014 +0100
pkg/kamailio/deb: fix init script
(cherry picked from commit 424ab9dd4abd9b11b7cf4642335652145128fa7c)
---
pkg/kamailio/deb/debian/kamailio.init | 14 +++++---------
pkg/kamailio/deb/jessie/kamailio.init | 14 +++++---------
pkg/kamailio/deb/precise/kamailio.init | 14 +++++---------
pkg/kamailio/deb/squeeze/kamailio.init | 14 +++++---------
pkg/kamailio/deb/wheezy/kamailio.init | 14 +++++---------
5 files changed, 25 insertions(+), 45 deletions(-)
diff --git a/pkg/kamailio/deb/debian/kamailio.init
b/pkg/kamailio/deb/debian/kamailio.init
index e8c1765..7c08563 100644
--- a/pkg/kamailio/deb/debian/kamailio.init
+++ b/pkg/kamailio/deb/debian/kamailio.init
@@ -99,7 +99,7 @@ MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
if test "$DUMP_CORE" = "yes" ; then
# set proper ulimit
ulimit -c unlimited
-
+
# directory for the core dump files
# COREDIR=/home/corefiles
# [ -d $COREDIR ] || mkdir $COREDIR
@@ -138,18 +138,14 @@ case "$1" in
check_kamailio_config
create_radius_seqfile
- log_daemon_msg "Restarting $DESC: $NAME"
- start-stop-daemon --oknodo --stop --quiet --pidfile \
- $PIDFILE --exec $DAEMON
+ $0 stop
sleep 1
- start-stop-daemon --start --quiet --pidfile \
- $PIDFILE --exec $DAEMON -- $OPTIONS
- log_end_msg 0
+ $0 start
;;
status)
log_daemon_msg "Status of $DESC: "
-
- status_of_porc "$PIDFILE" $NAME $NAME
+
+ status_of_proc -p"$PIDFILE" $NAME $NAME
;;
*)
N=/etc/init.d/$NAME
diff --git a/pkg/kamailio/deb/jessie/kamailio.init
b/pkg/kamailio/deb/jessie/kamailio.init
index e8c1765..7c08563 100644
--- a/pkg/kamailio/deb/jessie/kamailio.init
+++ b/pkg/kamailio/deb/jessie/kamailio.init
@@ -99,7 +99,7 @@ MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
if test "$DUMP_CORE" = "yes" ; then
# set proper ulimit
ulimit -c unlimited
-
+
# directory for the core dump files
# COREDIR=/home/corefiles
# [ -d $COREDIR ] || mkdir $COREDIR
@@ -138,18 +138,14 @@ case "$1" in
check_kamailio_config
create_radius_seqfile
- log_daemon_msg "Restarting $DESC: $NAME"
- start-stop-daemon --oknodo --stop --quiet --pidfile \
- $PIDFILE --exec $DAEMON
+ $0 stop
sleep 1
- start-stop-daemon --start --quiet --pidfile \
- $PIDFILE --exec $DAEMON -- $OPTIONS
- log_end_msg 0
+ $0 start
;;
status)
log_daemon_msg "Status of $DESC: "
-
- status_of_porc "$PIDFILE" $NAME $NAME
+
+ status_of_proc -p"$PIDFILE" $NAME $NAME
;;
*)
N=/etc/init.d/$NAME
diff --git a/pkg/kamailio/deb/precise/kamailio.init
b/pkg/kamailio/deb/precise/kamailio.init
index e8c1765..7c08563 100644
--- a/pkg/kamailio/deb/precise/kamailio.init
+++ b/pkg/kamailio/deb/precise/kamailio.init
@@ -99,7 +99,7 @@ MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
if test "$DUMP_CORE" = "yes" ; then
# set proper ulimit
ulimit -c unlimited
-
+
# directory for the core dump files
# COREDIR=/home/corefiles
# [ -d $COREDIR ] || mkdir $COREDIR
@@ -138,18 +138,14 @@ case "$1" in
check_kamailio_config
create_radius_seqfile
- log_daemon_msg "Restarting $DESC: $NAME"
- start-stop-daemon --oknodo --stop --quiet --pidfile \
- $PIDFILE --exec $DAEMON
+ $0 stop
sleep 1
- start-stop-daemon --start --quiet --pidfile \
- $PIDFILE --exec $DAEMON -- $OPTIONS
- log_end_msg 0
+ $0 start
;;
status)
log_daemon_msg "Status of $DESC: "
-
- status_of_porc "$PIDFILE" $NAME $NAME
+
+ status_of_proc -p"$PIDFILE" $NAME $NAME
;;
*)
N=/etc/init.d/$NAME
diff --git a/pkg/kamailio/deb/squeeze/kamailio.init
b/pkg/kamailio/deb/squeeze/kamailio.init
index e8c1765..7c08563 100644
--- a/pkg/kamailio/deb/squeeze/kamailio.init
+++ b/pkg/kamailio/deb/squeeze/kamailio.init
@@ -99,7 +99,7 @@ MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
if test "$DUMP_CORE" = "yes" ; then
# set proper ulimit
ulimit -c unlimited
-
+
# directory for the core dump files
# COREDIR=/home/corefiles
# [ -d $COREDIR ] || mkdir $COREDIR
@@ -138,18 +138,14 @@ case "$1" in
check_kamailio_config
create_radius_seqfile
- log_daemon_msg "Restarting $DESC: $NAME"
- start-stop-daemon --oknodo --stop --quiet --pidfile \
- $PIDFILE --exec $DAEMON
+ $0 stop
sleep 1
- start-stop-daemon --start --quiet --pidfile \
- $PIDFILE --exec $DAEMON -- $OPTIONS
- log_end_msg 0
+ $0 start
;;
status)
log_daemon_msg "Status of $DESC: "
-
- status_of_porc "$PIDFILE" $NAME $NAME
+
+ status_of_proc -p"$PIDFILE" $NAME $NAME
;;
*)
N=/etc/init.d/$NAME
diff --git a/pkg/kamailio/deb/wheezy/kamailio.init
b/pkg/kamailio/deb/wheezy/kamailio.init
index e8c1765..7c08563 100644
--- a/pkg/kamailio/deb/wheezy/kamailio.init
+++ b/pkg/kamailio/deb/wheezy/kamailio.init
@@ -99,7 +99,7 @@ MEMORY=$((`echo $MEMORY | sed -e 's/[^0-9]//g'`))
if test "$DUMP_CORE" = "yes" ; then
# set proper ulimit
ulimit -c unlimited
-
+
# directory for the core dump files
# COREDIR=/home/corefiles
# [ -d $COREDIR ] || mkdir $COREDIR
@@ -138,18 +138,14 @@ case "$1" in
check_kamailio_config
create_radius_seqfile
- log_daemon_msg "Restarting $DESC: $NAME"
- start-stop-daemon --oknodo --stop --quiet --pidfile \
- $PIDFILE --exec $DAEMON
+ $0 stop
sleep 1
- start-stop-daemon --start --quiet --pidfile \
- $PIDFILE --exec $DAEMON -- $OPTIONS
- log_end_msg 0
+ $0 start
;;
status)
log_daemon_msg "Status of $DESC: "
-
- status_of_porc "$PIDFILE" $NAME $NAME
+
+ status_of_proc -p"$PIDFILE" $NAME $NAME
;;
*)
N=/etc/init.d/$NAME