check for file before going sed on it

This commit is contained in:
Sebastian Hugentobler 2017-06-15 11:56:37 +02:00
parent cb524cb098
commit 0eaa80950a

View File

@ -12,8 +12,9 @@ PGPASSWORD=$DB_PASSWORD psql -h $DB_HOST -U $DB_USER -d $DB_NAME -c "SELECT EXIS
if [ $? -ne 1 ]; then
cd /var/lib/nextcloud
if [ ! -f /var/lib/nextcloud/config/config.php ]; then
sed -i -e "s/'installed' => true,/'installed' => false,/g" /var/lib/nextcloud/config/config.php
fi
s6-setuidgid nginx ./occ maintenance:install \
--database=pgsql \
--database-host=$DB_HOST \