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