forked from GNUsocial/gnu-social
[TOOLS] Updated install script to also support mariadb
This commit is contained in:
parent
50e450f082
commit
8a86c5940d
@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
case $DBMS in
|
||||
"mariadb")
|
||||
CMD="mysqladmin ping --silent -hdb -uroot -p${MYSQL_ROOT_PASSWORD}"
|
||||
;;
|
||||
"postgres")
|
||||
CMD="pg_isready -hdb -q -Upostgres"
|
||||
;;
|
||||
"mariadb")
|
||||
CMD="mysqladmin ping --silent -hdb -uroot -p${MYSQL_ROOT_PASSWORD}"
|
||||
;;
|
||||
*)
|
||||
exit 1
|
||||
esac
|
||||
|
@ -1,11 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
PGPASSWORD="${POSTGRES_PASSWORD}" psql -ltq -Upostgres -hdb | \
|
||||
cut -d '|' -f1 | grep -wq "${SOCIAL_DB}"
|
||||
case "${DBMS}" in
|
||||
'postgres')
|
||||
PGPASSWORD="${POSTGRES_PASSWORD}" psql -ltq -Upostgres -hdb | \
|
||||
cut -d '|' -f1 | grep -wq "${SOCIAL_DB}"
|
||||
DB_EXISTS=$?
|
||||
;;
|
||||
'mariadb')
|
||||
mysqlcheck -cqs -uroot -p${MYSQL_ROOT_PASSWORD} -hdb social 2> /dev/null
|
||||
DB_EXISTS=$?
|
||||
exit 1
|
||||
;;
|
||||
*)
|
||||
echo "Unknown DBMS"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
if [ ! $? ]; then
|
||||
|
||||
echo ${SOCIAL_DB}
|
||||
if [ ! ${DB_EXISTS} ]; then
|
||||
|
||||
echo -e "Installing GNU social\nInstalling composer dependencies"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user