You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud-server/.devcontainer/setup.sh

30 lines
858 B

#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" >/dev/null 2>&1 && pwd )"
cd $DIR/
git submodule update --init
# Codespace config
cp .devcontainer/codespace.config.php config/codespace.config.php
# Set git safe.directory
git config --global --add safe.directory /var/www/html
git config --global --add safe.directory /var/www/html/3rdparty
# Onetime installation setup
if [[ ! $(sudo -u www-data php occ status) =~ installed:[[:space:]]*true ]]; then
echo "Running NC installation"
sudo -u www-data php occ maintenance:install \
--verbose \
--database=pgsql \
--database-name=postgres \
--database-host=127.0.0.1 \
--database-port=5432 \
--database-user=postgres \
--database-pass=postgres \
--admin-user admin \
--admin-pass admin
fi
service apache2 restart