2020-05-05 02:23:55 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2020-05-06 16:32:07 +01:00
|
|
|
PGPASSWORD="${POSTGRES_PASSWORD}" psql -ltq -Upostgres -hdb | \
|
|
|
|
cut -d '|' -f1 | grep -wq "${SOCIAL_DB}"
|
|
|
|
|
|
|
|
if [ ! $? ]; then
|
|
|
|
|
|
|
|
echo ${SOCIAL_DB}
|
2020-05-05 02:23:55 +01:00
|
|
|
|
|
|
|
echo -e "Installing GNU social\nInstalling composer dependencies"
|
|
|
|
|
|
|
|
cd /var/www/social
|
|
|
|
|
|
|
|
composer install
|
|
|
|
|
2020-05-06 16:32:07 +01:00
|
|
|
chmod g+w -R .
|
|
|
|
chown -R :www-data .
|
2020-05-05 02:23:55 +01:00
|
|
|
|
2020-05-06 16:32:07 +01:00
|
|
|
php bin/console doctrine:database:create || exit 1
|
2020-05-05 02:23:55 +01:00
|
|
|
|
|
|
|
echo "GNU social is installed"
|
|
|
|
fi
|