Skip to content

Commit

Permalink
opensipsdbctl: Fix DB creation in dev mode
Browse files Browse the repository at this point in the history
    * scripts/opensipsdbctl ... now works
  • Loading branch information
liviuchircu committed Mar 2, 2015
1 parent 7fefe50 commit 31c472c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion scripts/opensipsdbctl
Expand Up @@ -10,7 +10,7 @@ PATH=$PATH:/usr/local/sbin/

# for testing only, please don't enable this in production environments
# as this introduce security risks
TEST="true"
TEST="false"

### include resource files, if any
if [ -f /etc/opensips/opensipsctlrc ]; then
Expand All @@ -26,6 +26,8 @@ fi
if [ $TEST = "true" ]; then
if [ -f ./opensipsctlrc ]; then
. ./opensipsctlrc
elif [ -f scripts/opensipsctlrc ]; then
. scripts/opensipsctlrc
fi
fi

Expand Down
4 changes: 3 additions & 1 deletion scripts/opensipsdbctl.mysql
Expand Up @@ -18,8 +18,10 @@

# path to the database schemas
DATA_DIR="/usr/local/share/opensips"
if [ -d "$DATA_DIR/mysql" ] ; then
if [ -d "$DATA_DIR/mysql" ]; then
DB_SCHEMA="$DATA_DIR/mysql"
elif [ -d "scripts/mysql" ]; then
DB_SCHEMA="scripts/mysql"
else
DB_SCHEMA="./mysql"
fi
Expand Down

0 comments on commit 31c472c

Please sign in to comment.