From ff92c50723a517174baae4425cf3255f8d8477b8 Mon Sep 17 00:00:00 2001 From: karl anderson Date: Fri, 30 Sep 2016 16:19:53 -0700 Subject: [PATCH] added kazoo-kamailio reset-restart --- system/sbin/kazoo-kamailio | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/system/sbin/kazoo-kamailio b/system/sbin/kazoo-kamailio index be8ca1f..33a045a 100755 --- a/system/sbin/kazoo-kamailio +++ b/system/sbin/kazoo-kamailio @@ -64,6 +64,24 @@ restart() { start } +reset-restart() { + cd /etc/kazoo/kamailio/dbtext/ + stop + + head -n1 active_watchers > active_watchers.tmp + mv -f active_watchers.tmp active_watchers + + head -n1 watchers > watchers.tmp + mv -f watchers.tmp watchers + + head -n1 presentity > presentity.tmp + mv -f presentity.tmp presentity + + chown kamailio:daemon * + + start +} + status() { kamctl fifo ds_list RETVAL=$? @@ -110,6 +128,9 @@ case "$1" in restart) restart ;; + reset-restart) + reset-restart + ;; status) status ;; @@ -117,7 +138,7 @@ case "$1" in check_config ;; *) - echo $"Usage: $0 {prepare|start|background|stop|restart|status|check|pid}" + echo $"Usage: $0 {prepare|start|background|stop|restart|reset-restart|status|check|pid}" esac exit ${RETVAL}