Skip to content

Commit

Permalink
opensipsdbctl: allow running from root dir for _all_ SQL backends
Browse files Browse the repository at this point in the history
(completes commit 31c472c)
  • Loading branch information
liviuchircu committed Mar 23, 2015
1 parent 5092a46 commit 49ed85a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion scripts/opensipsdbctl.db_berkeley
Expand Up @@ -112,8 +112,10 @@ fi ;

# path to the database schemas
DATA_DIR="/usr/local/share/opensips"
if [ -d "$DATA_DIR/db_berkeley/opensips" ] ; then
if [ -d "$DATA_DIR/db_berkeley/opensips" ]; then
DB_SCHEMA="$DATA_DIR/db_berkeley/opensips"
elif [ -d "scripts/db_berkeley/opensips" ]; then
DB_SCHEMA="scripts/db_berkeley/opensips"
else
DB_SCHEMA="./db_berkeley/opensips"
fi
Expand Down
4 changes: 3 additions & 1 deletion scripts/opensipsdbctl.dbtext
Expand Up @@ -11,8 +11,10 @@

# path to the database schemas
DATA_DIR="/usr/local/share/opensips"
if [ -d "$DATA_DIR/dbtext/opensips" ] ; then
if [ -d "$DATA_DIR/dbtext/opensips" ]; then
DB_SCHEMA="$DATA_DIR/dbtext/opensips"
elif [ -d "scripts/dbtext/opensips" ]; then
DB_SCHEMA="scripts/dbtext/opensips"
else
DB_SCHEMA="./dbtext/opensips"
fi
Expand Down
4 changes: 3 additions & 1 deletion scripts/opensipsdbctl.oracle
Expand Up @@ -13,8 +13,10 @@ DBSYSUSER="sys"

# path to the database schemas
DATA_DIR="/usr/local/share/opensips"
if [ -d "$DATA_DIR/oracle" ] ; then
if [ -d "$DATA_DIR/oracle" ]; then
DB_SCHEMA="$DATA_DIR/oracle"
elif [ -d "scripts/oracle" ]; then
DB_SCHEMA="scripts/oracle"
else
DB_SCHEMA="./oracle"
fi
Expand Down
4 changes: 3 additions & 1 deletion scripts/opensipsdbctl.pgsql
Expand Up @@ -29,8 +29,10 @@

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

0 comments on commit 49ed85a

Please sign in to comment.