2021-02-01 12:17:04 +00:00
|
|
|
#!/bin/bash
|
2024-05-30 18:13:41 +00:00
|
|
|
#
|
|
|
|
# SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
#
|
2021-02-01 12:17:04 +00:00
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" >/dev/null 2>&1 && pwd )"
|
|
|
|
|
|
|
|
cd $DIR/
|
2023-03-11 12:18:21 +00:00
|
|
|
|
2023-03-31 09:25:24 +00:00
|
|
|
git submodule update --init
|
|
|
|
|
|
|
|
# Codespace config
|
|
|
|
cp .devcontainer/codespace.config.php config/codespace.config.php
|
|
|
|
|
2023-04-06 14:56:54 +00:00
|
|
|
# VSCode debugger profile
|
|
|
|
mkdir -p .vscode && cp .devcontainer/launch.json .vscode/launch.json
|
|
|
|
|
2023-03-11 12:18:21 +00:00
|
|
|
# Onetime installation setup
|
2023-03-31 06:40:04 +00:00
|
|
|
if [[ ! $(sudo -u ${APACHE_RUN_USER} php occ status) =~ installed:[[:space:]]*true ]]; then
|
2023-03-11 12:18:21 +00:00
|
|
|
echo "Running NC installation"
|
2023-03-31 06:40:04 +00:00
|
|
|
sudo -u ${APACHE_RUN_USER} php occ maintenance:install \
|
2023-03-11 12:18:21 +00:00
|
|
|
--verbose \
|
|
|
|
--database=pgsql \
|
|
|
|
--database-name=postgres \
|
|
|
|
--database-host=127.0.0.1 \
|
|
|
|
--database-port=5432 \
|
|
|
|
--database-user=postgres \
|
|
|
|
--database-pass=postgres \
|
|
|
|
--admin-user admin \
|
2023-03-27 07:05:27 +00:00
|
|
|
--admin-pass admin
|
2023-03-11 12:18:21 +00:00
|
|
|
fi
|
|
|
|
|
2023-03-31 06:40:04 +00:00
|
|
|
sudo service apache2 restart
|