mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-23 16:18:44 +05:00
Renew Drone CI
This commit is contained in:
committed by
Dan Christian Bogos
parent
61a781675c
commit
1445fa3b49
30
data/docker/integration/scripts/postgres/setup_cgr_db.sh
Executable file
30
data/docker/integration/scripts/postgres/setup_cgr_db.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#! /usr/bin/env sh
|
||||
|
||||
|
||||
user=$1
|
||||
if [ -z "$1" ]; then
|
||||
user="cgrates"
|
||||
fi
|
||||
|
||||
host=$2
|
||||
if [ -z "$2" ]; then
|
||||
host="localhost"
|
||||
fi
|
||||
|
||||
DIR="$(dirname "$(readlink -f "$0")")"
|
||||
|
||||
"$DIR"/create_db_with_users.sh
|
||||
|
||||
export PGPASSWORD="CGRateS.org"
|
||||
|
||||
psql -U $user -h $host -d cgrates -f "$DIR"/create_cdrs_tables.sql
|
||||
cdrt=$?
|
||||
psql -U $user -h $host -d cgrates -f "$DIR"/create_tariffplan_tables.sql
|
||||
tpt=$?
|
||||
|
||||
if [ $cdrt = 0 ] && [ $tpt = 0 ]; then
|
||||
echo "\n\t+++ CGR-DB successfully set-up! +++\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user