|
@@ -1,11 +1,12 @@
|
|
#!/bin/bash
|
|
#!/bin/bash
|
|
#
|
|
#
|
|
-# $Id$
|
|
|
|
-#
|
|
|
|
# control tool for maintaining Kamailio databases
|
|
# control tool for maintaining Kamailio databases
|
|
#
|
|
#
|
|
#===================================================================
|
|
#===================================================================
|
|
|
|
|
|
|
|
+### version for this script
|
|
|
|
+VERSION='4.2.0'
|
|
|
|
+
|
|
PATH=$PATH:/usr/local/sbin/
|
|
PATH=$PATH:/usr/local/sbin/
|
|
|
|
|
|
# for testing only, please don't enable this in production environments
|
|
# for testing only, please don't enable this in production environments
|
|
@@ -13,6 +14,15 @@ PATH=$PATH:/usr/local/sbin/
|
|
TEST="false"
|
|
TEST="false"
|
|
|
|
|
|
### include resource files, if any
|
|
### include resource files, if any
|
|
|
|
+which readlink > /dev/null
|
|
|
|
+ret=$?
|
|
|
|
+if [ $ret -eq 0 ] ; then
|
|
|
|
+ KAMCTLFULLPATH=$(readlink -f "$0")
|
|
|
|
+ KAMCTLDIRPATH=$(dirname "$KAMCTLFULLPATH")
|
|
|
|
+ if [ -f $KAMCTLDIRPATH/kamctlrc ]; then
|
|
|
|
+ . $KAMCTLDIRPATH/kamctlrc
|
|
|
|
+ fi
|
|
|
|
+fi
|
|
if [ -f /etc/kamailio/kamctlrc ]; then
|
|
if [ -f /etc/kamailio/kamctlrc ]; then
|
|
. /etc/kamailio/kamctlrc
|
|
. /etc/kamailio/kamctlrc
|
|
fi
|
|
fi
|
|
@@ -30,9 +40,6 @@ if [ $TEST = "true" ]; then
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
|
|
-### version for this script
|
|
|
|
-VERSION='$Revision$'
|
|
|
|
-
|
|
|
|
if [ -z "$MYDIR" ] ; then
|
|
if [ -z "$MYDIR" ] ; then
|
|
MYDIR=`dirname $0`
|
|
MYDIR=`dirname $0`
|
|
fi
|
|
fi
|