mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
30 lines
440 B
Bash
Executable File
30 lines
440 B
Bash
Executable File
#! /usr/bin/env sh
|
|
|
|
export PGPASSWORD="CGRateS.org"
|
|
|
|
user=$1
|
|
if [ -z "$1" ]; then
|
|
user="cgrates"
|
|
fi
|
|
|
|
host=$2
|
|
if [ -z "$2" ]; then
|
|
host="localhost"
|
|
fi
|
|
|
|
./create_db_with_users.sh
|
|
|
|
psql -U $user -h $host -d cgrates -f create_cdrs_tables.sql
|
|
cdrt=$?
|
|
psql -U $user -h $host -d cgrates -f create_tariffplan_tables.sql
|
|
tpt=$?
|
|
|
|
if [ $cdrt = 0 ] && [ $tpt = 0 ]; then
|
|
echo ""
|
|
echo "\t+++ CGR-DB successfully set-up! +++"
|
|
echo ""
|
|
exit 0
|
|
fi
|
|
|
|
|