mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-19 16:46:23 -07:00
12 lines
327 B
Bash
12 lines
327 B
Bash
|
|
#!/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
|