From c7d97d3215990c0d40f869671ed8367f5999a752 Mon Sep 17 00:00:00 2001 From: swysor Date: Fri, 27 Oct 2017 17:18:50 -0400 Subject: [PATCH] Heredoc to prevent the prompt when initting the db --- system/sbin/kazoo-kamailio | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/system/sbin/kazoo-kamailio b/system/sbin/kazoo-kamailio index e9333f8..cf59b79 100755 --- a/system/sbin/kazoo-kamailio +++ b/system/sbin/kazoo-kamailio @@ -43,7 +43,7 @@ prepare() { fi fi if [ ! -f /etc/kazoo/kamailio/db/kazoo.db ]; then - KazooDB -init /etc/kazoo/kamailio/kazoodb.sql + init_database fi chown -R ${USER} /etc/kazoo/kamailio/db RETVAL=$? @@ -59,6 +59,10 @@ mount_point_exists() { return $? } +init_database() { + KazooDB -init /etc/kazoo/kamailio/kazoodb.sql <