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