mirror of
https://github.com/Eggbertx/gochan.git
synced 2025-08-03 11:46:22 -07:00
13 lines
395 B
Bash
Executable file
13 lines
395 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
|
|
elif [ "$DBTYPE" = "sqlite3" ]; then
|
|
sqlite3 /etc/gochan/gochan.db
|
|
else
|
|
echo "DB type '$DBTYPE' not supported"
|
|
fi
|