Files
cgrates/data/docker/integration/scripts/mysql/setup_ers_db.sh
arberkatellari 1445fa3b49 Renew Drone CI
2023-09-01 18:01:43 +02:00

26 lines
396 B
Bash
Executable File

#! /usr/bin/env sh
if test $# -lt 2; then
echo ""
echo "setup_cgr_db.sh <db_user> <db_password> [<db_host>]"
echo ""
exit 0
fi
host=$3
if [ -z "$3" ]; then
host="localhost"
fi
DIR="$(dirname "$(readlink -f "$0")")"
mysql -u $1 -p$2 -h $host < "$DIR"/create_ers_db.sql
cu=$?
if [ $cu = 0 ]; then
echo "\n\t+++ CGR-DB successfully set-up! +++\n"
exit 0
fi