1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-03 23:56:22 -07:00
gochan/devtools/dbconnect.sh
2022-02-07 18:28:27 -08:00

11 lines
327 B
Bash
Executable file

#!/usr/bin/env bash
# used for connecting to gochan's database whether it's using MySQL/MariaDB or PostgreSQL
if [ "$DBTYPE" = "mysql" ] || [ -z "$DBTYPE" ]; then
mysql -stu gochan -D gochan -pgochan
elif [ "$DBTYPE" = "postgresql" ]; then
psql -U gochan -h 127.0.0.1 gochan
else
echo "DB type '$DBTYPE' not supported"
fi