Skip to content
Snippets Groups Projects
Commit 4d6c8b81 authored by Bob Mottram's avatar Bob Mottram
Browse files

Restart nginx for matrix

parent cab47adb
No related branches found
No related tags found
No related merge requests found
......@@ -184,7 +184,7 @@ function logging_off_matrix {
fi
}
function matrix_nginx {
function create_matrix_nginx_config {
matrix_nginx_site=/etc/nginx/sites-available/$MATRIX_DOMAIN_NAME
if [[ $ONION_ONLY == "no" ]]; then
{ echo 'server {';
......@@ -278,6 +278,8 @@ function matrix_nginx {
sed -i 's|limit_conn conn_limit_per_ip.*|limit_conn conn_limit_per_ip 50;|g' "$matrix_nginx_site"
sed -i 's|limit_req zone.*|limit_req zone=req_limit_per_ip burst=50 nodelay;|g' "$matrix_nginx_site"
nginx_ensite $MATRIX_DOMAIN_NAME
function_check add_ddns_domain
add_ddns_domain $MATRIX_DOMAIN_NAME
}
......@@ -749,6 +751,8 @@ function install_home_server {
systemctl restart matrix
fi
systemctl restart nginx
echo $'Waiting for the database to be created'
# shellcheck disable=SC2034
for i in {1..60}
......@@ -866,8 +870,10 @@ function install_matrix {
if [ ! -f "$MATRIX_PIP" ]; then
if [[ "$MATRIX_PIP" == *'pip' ]]; then
# shellcheck disable=SC2230
MATRIX_PIP=$(which pip)
else
# shellcheck disable=SC2230
MATRIX_PIP=$(which pip3)
fi
fi
......@@ -906,8 +912,8 @@ function install_matrix {
increment_app_install_progress
function_check matrix_nginx
matrix_nginx
function_check create_matrix_nginx_config
create_matrix_nginx_config
increment_app_install_progress
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment