detect installation in a better way

This commit is contained in:
Sebastian Hugentobler 2018-01-30 11:11:38 +01:00
parent 2bd9546f47
commit 9b3d6ef7ef
3 changed files with 4 additions and 65 deletions

View file

@ -3,9 +3,9 @@ set -ex
cd /usr/share/webapps/nextcloud
PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = '${DB_TABLE_PREFIX}appconfig')" | grep f
#PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT EXISTS (SELECT 1 FROM information_schema.tables WHERE table_name = '${DB_TABLE_PREFIX}appconfig')" | grep f
if [ $? -ne 1 ]; then
if [ ! -f /var/lib/nextcloud/data/.installed ]; then
s6-setuidgid nginx ./occ maintenance:install \
--database=pgsql \
--database-host=$DB_HOST \
@ -24,6 +24,8 @@ if [ $? -ne 1 ]; then
s6-setuidgid nginx ./occ app:enable files_texteditor
s6-setuidgid nginx ./occ app:enable files_pdfviewer
s6-setuidgid nginx ./occ app:enable theming
touch /var/lib/nextcloud/data/.installed
fi
s6-setuidgid nginx ./occ config:system:set --value "https://$DOMAIN" overwrite.cli.url