kamailio: add sleep time to init during restart

Signed-off-by: Jiri Slachta <slachta@cesnet.cz>
This commit is contained in:
Jiri Slachta 2014-12-21 14:24:38 +01:00
parent d631b536ac
commit 81e1a4cc91
4 changed files with 24 additions and 8 deletions

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=kamailio3
PKG_VERSION:=3.3.7
PKG_RELEASE:=8
PKG_RELEASE:=9
PKG_SOURCE_URL:=http://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src/
PKG_SOURCE:=kamailio-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz

View file

@ -21,10 +21,18 @@ start() {
echo "[WARNING] Kamailio not yet configured. Edit /etc/default/kamailio first."
else
start-stop-daemon -S -x $BINFILE -b -- -P $PIDFILE -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
fi
echo "[INFO] Kamailio has succesfully started."
fi
}
stop() {
start-stop-daemon -K -x $BINFILE -p $PIDFILE -q
rm -rf $PID_FILE
start-stop-daemon -K -x $BINFILE -p $PIDFILE -q
rm -rf $PID_FILE
}
restart(){
echo "[INFO] Restarting kamailio. Waiting 5 seconds before start."
stop
sleep 5
start
}

View file

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=kamailio4
PKG_VERSION:=4.2.1
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE_URL:=http://www.kamailio.org/pub/kamailio/$(PKG_VERSION)/src/
PKG_SOURCE:=kamailio-$(PKG_VERSION)$(PKG_VARIANT)_src.tar.gz

View file

@ -21,10 +21,18 @@ start() {
echo "[WARNING] Kamailio not yet configured. Edit /etc/default/kamailio first."
else
start-stop-daemon -S -x $BINFILE -b -- -P $PIDFILE -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY
fi
echo "[INFO] Kamailio has succesfully started."
fi
}
stop() {
start-stop-daemon -K -x $BINFILE -p $PIDFILE -q
rm -rf $PID_FILE
start-stop-daemon -K -x $BINFILE -p $PIDFILE -q
rm -rf $PID_FILE
}
restart(){
echo "[INFO] Restarting kamailio. Waiting 5 seconds before start."
stop
sleep 5
start
}