2021-02-01 13:17:04 +01:00
|
|
|
#!/bin/bash
|
|
|
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" >/dev/null 2>&1 && pwd )"
|
|
|
|
|
|
|
|
cd $DIR/
|
2023-03-11 13:18:21 +01:00
|
|
|
|
|
|
|
# Set git safe.directory
|
|
|
|
git config --global --add safe.directory /var/www/html
|
2023-03-27 09:05:27 +02:00
|
|
|
git config --global --add safe.directory /var/www/html/3rdparty
|
2023-03-11 13:18:21 +01:00
|
|
|
|
2023-03-31 11:25:24 +02:00
|
|
|
git submodule update --init
|
|
|
|
|
|
|
|
# Codespace config
|
|
|
|
cp .devcontainer/codespace.config.php config/codespace.config.php
|
|
|
|
|
2023-04-06 16:56:54 +02:00
|
|
|
# VSCode debugger profile
|
|
|
|
mkdir -p .vscode && cp .devcontainer/launch.json .vscode/launch.json
|
|
|
|
|
2023-03-11 13:18:21 +01:00
|
|
|
# Onetime installation setup
|
2023-03-31 08:40:04 +02:00
|
|
|
if [[ ! $(sudo -u ${APACHE_RUN_USER} php occ status) =~ installed:[[:space:]]*true ]]; then
|
2023-03-11 13:18:21 +01:00
|
|
|
echo "Running NC installation"
|
2023-03-31 08:40:04 +02:00
|
|
|
sudo -u ${APACHE_RUN_USER} php occ maintenance:install \
|
2023-03-11 13:18:21 +01: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 09:05:27 +02:00
|
|
|
--admin-pass admin
|
2023-03-11 13:18:21 +01:00
|
|
|
fi
|
|
|
|
|
2023-03-31 08:40:04 +02:00
|
|
|
sudo service apache2 restart
|