setup.sh 835 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" >/dev/null 2>&1 && pwd )"
  3. cd $DIR/
  4. git submodule update --init
  5. # Codespace config
  6. cp .devcontainer/codespace.config.php config/codespace.config.php
  7. # VSCode debugger profile
  8. mkdir -p .vscode && cp .devcontainer/launch.json .vscode/launch.json
  9. # Onetime installation setup
  10. if [[ ! $(sudo -u ${APACHE_RUN_USER} php occ status) =~ installed:[[:space:]]*true ]]; then
  11. echo "Running NC installation"
  12. sudo -u ${APACHE_RUN_USER} php occ maintenance:install \
  13. --verbose \
  14. --database=pgsql \
  15. --database-name=postgres \
  16. --database-host=127.0.0.1 \
  17. --database-port=5432 \
  18. --database-user=postgres \
  19. --database-pass=postgres \
  20. --admin-user admin \
  21. --admin-pass admin
  22. fi
  23. sudo service apache2 restart