Module: kamailio
Branch: master
Commit: f16ec35fa448d03613e6bbbff4c354012f56073e
URL:
https://github.com/kamailio/kamailio/commit/f16ec35fa448d03613e6bbbff4c3540…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2023-10-06T12:33:08+02:00
kamdbctl: check if kamctlrc is readable
---
Modified: utils/kamctl/kamdbctl
---
Diff:
https://github.com/kamailio/kamailio/commit/f16ec35fa448d03613e6bbbff4c3540…
Patch:
https://github.com/kamailio/kamailio/commit/f16ec35fa448d03613e6bbbff4c3540…
---
diff --git a/utils/kamctl/kamdbctl b/utils/kamctl/kamdbctl
index 4f3f407f040..5a89a9540cd 100755
--- a/utils/kamctl/kamdbctl
+++ b/utils/kamctl/kamdbctl
@@ -35,13 +35,13 @@ if [ -n "$KAMCTLFULLPATH" ] ; then
fi
# check for rc file at standard locations
-if [ -f /etc/kamailio/kamctlrc ]; then
+if [ -f /etc/kamailio/kamctlrc -a -r /etc/kamailio/kamctlrc ]; then
. /etc/kamailio/kamctlrc
fi
-if [ -f /usr/local/etc/kamailio/kamctlrc ]; then
+if [ -f /usr/local/etc/kamailio/kamctlrc -a -r /usr/local/etc/kamailio/kamctlrc ]; then
. /usr/local/etc/kamailio/kamctlrc
fi
-if [ -f ~/.kamctlrc ]; then
+if [ -f ~/.kamctlrc -a -r ~/.kamctlrc ]; then
. ~/.kamctlrc
fi