|
@@ -15,15 +15,26 @@ TEST="false"
|
|
|
|
|
|
### include config files
|
|
|
|
|
|
-which readlink > /dev/null
|
|
|
+# check for rc file at same location with kamctl
|
|
|
+which greadlink > /dev/null
|
|
|
ret=$?
|
|
|
if [ $ret -eq 0 ] ; then
|
|
|
- KAMCTLFULLPATH=$(readlink -f "$0")
|
|
|
+ KAMCTLFULLPATH=$(greadlink -f "$0")
|
|
|
+else
|
|
|
+ which readlink > /dev/null
|
|
|
+ ret=$?
|
|
|
+ if [ $ret -eq 0 ] ; then
|
|
|
+ KAMCTLFULLPATH=$(readlink -f "$0")
|
|
|
+ fi
|
|
|
+fi
|
|
|
+if [ -n "$KAMCTLFULLPATH" ] ; then
|
|
|
KAMCTLDIRPATH=$(dirname "$KAMCTLFULLPATH")
|
|
|
if [ -f $KAMCTLDIRPATH/kamctlrc ]; then
|
|
|
. $KAMCTLDIRPATH/kamctlrc
|
|
|
fi
|
|
|
fi
|
|
|
+
|
|
|
+# check for rc file at standard locations
|
|
|
if [ -f /etc/kamailio/kamctlrc ]; then
|
|
|
. /etc/kamailio/kamctlrc
|
|
|
fi
|