#!/usr/bin/env bash # # basxConnect Installer Script # # Homepage: https://connect.basx.org/ # Issues: https://github.com/basxsoftwareassociation/basxconnect/issues # Requires: bash, curl, sudo (if not root), tar # # This script installs basxConnect on your Linux system. # You have various options, to install a development environment, # or to install a production environment. # # $ curl https://get.basxconnect.solidcharity.com | bash -s devenv --url=test.basxconnect.example.org # or # $ wget -qO- https://get.basxconnect.solidcharity.com | bash -s devenv --url=test.basxconnect.example.org # # The syntax is: # # bash -s [devenv|prod] # # available options: # --git_url= # default is: --git_url=https://github.com/basxsoftwareassociation/basxconnect_demo.git # --branch= # default is: --branch=main # --url= # default is: --url=localhost # --behindsslproxy= # default is: --behindsslproxy=true # --adminemail= # # This should work on Fedora 36/37 and CentOS 8 Stream and CentOS 9 Stream and Debian 10 (Buster) and Debian 11 (Bullseye) and Ubuntu Focal (20.04) and Ubuntu Jammy (22.04). # Please open an issue if you notice any bugs. [[ $- = *i* ]] && echo "Don't source this script!" && return 10 export GIT_URL=https://github.com/basxsoftwareassociation/basxconnect_demo.git export BRANCH=main export DBMSType=sqlite export URL=localhost export BEHIND_SSL_PROXY=true export DJANGO_SUPERUSER_USERNAME="admin" export DJANGO_SUPERUSER_PASSWORD="CHANGEME" export DJANGO_SUPERUSER_EMAIL="admin@example.org" setup_nginx() { nginx_conf_path="/etc/nginx/conf.d/basxconnect.conf" # let the default nginx server run on another port sed -i "s/listen\(.*\)80/listen\181/g" /etc/nginx/nginx.conf if [ -f /etc/nginx/sites-enabled/default ]; then sed -i "s/listen\(.*\)80/listen\181/g" /etc/nginx/sites-enabled/default fi cat > $nginx_conf_path < $systemdpath/basxconnect.service <> $SRC_PATH/basxconnect_demo/settings/production.py <> $SRC_PATH/basxconnect_demo/settings/local.py <> $USER_HOME/my.cnf < $SRC_PATH/tmp_setup_mysql.sh <