riot config filename
This commit is contained in:
parent
7b1e6b2df8
commit
22198a7f5f
|
@ -66,8 +66,6 @@ function add_user_riot {
|
||||||
}
|
}
|
||||||
|
|
||||||
function riot_remove_bad_links {
|
function riot_remove_bad_links {
|
||||||
# We should not need to be depending on sites that we don't control
|
|
||||||
sed -i 's|https://piwik.riot.im/||g' /var/www/$RIOT_DOMAIN_NAME/htdocs/config.json
|
|
||||||
sed -i '/riot.im/d' /var/www/$RIOT_DOMAIN_NAME/htdocs/home.html
|
sed -i '/riot.im/d' /var/www/$RIOT_DOMAIN_NAME/htdocs/home.html
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -253,23 +251,25 @@ function install_riot {
|
||||||
riot_download
|
riot_download
|
||||||
|
|
||||||
cd /var/www/$RIOT_DOMAIN_NAME/htdocs
|
cd /var/www/$RIOT_DOMAIN_NAME/htdocs
|
||||||
cp config.sample.json config.json
|
|
||||||
|
|
||||||
if [[ $ONION_ONLY == 'no' ]]; then
|
if [[ $ONION_ONLY == 'no' ]]; then
|
||||||
sed -i "s|\"default_hs_url\":.*|\"default_hs_url\": \"https://${MATRIX_DOMAIN_NAME}\",|g" config.json
|
riot_config_file="config.${RIOT_DOMAIN_NAME}.json"
|
||||||
sed -i "s|\"default_is_url\":.*|\"default_is_url\": \"https://${MATRIX_DOMAIN_NAME}\",|g" config.json
|
cp config.sample.json $riot_config_file
|
||||||
sed -i "s|\"integrations_ui_url\":.*|\"integrations_ui_url\": \"\",|g" config.json
|
sed -i "s|\"default_hs_url\":.*|\"default_hs_url\": \"https://${MATRIX_DOMAIN_NAME}\",|g" $riot_config_file
|
||||||
sed -i "s|\"integrations_rest_url\":.*|\"integrations_rest_url\": \"\",|g" config.json
|
sed -i "s|\"default_is_url\":.*|\"default_is_url\": \"https://${MATRIX_DOMAIN_NAME}\",|g" $riot_config_file
|
||||||
sed -i "s|\"bug_report_endpoint_url\":.*|\"bug_report_endpoint_url\": \"https://${MATRIX_DOMAIN_NAME}/bugs\",|g" config.json
|
sed -i "s|\"bug_report_endpoint_url\":.*|\"bug_report_endpoint_url\": \"https://${MATRIX_DOMAIN_NAME}/bugs\",|g" $riot_config_file
|
||||||
sed -i "/\"servers\":/a \"${MATRIX_DOMAIN_NAME}\"," config.json
|
sed -i "/\"servers\":/a \"${MATRIX_DOMAIN_NAME}\"," $riot_config_file
|
||||||
else
|
else
|
||||||
sed -i "s|\"default_hs_url\":.*|\"default_hs_url\": \"http://${MATRIX_ONION_DOMAIN_NAME}\",|g" config.json
|
riot_config_file="config.${MATRIX_ONION_DOMAIN_NAME}.json"
|
||||||
sed -i "s|\"default_is_url\":.*|\"default_is_url\": \"http://${MATRIX_ONION_DOMAIN_NAME}\",|g" config.json
|
cp config.sample.json $riot_config_file
|
||||||
sed -i "s|\"integrations_ui_url\":.*|\"integrations_ui_url\": \"\",|g" config.json
|
sed -i "s|\"default_hs_url\":.*|\"default_hs_url\": \"http://${MATRIX_ONION_DOMAIN_NAME}\",|g" $riot_config_file
|
||||||
sed -i "s|\"integrations_rest_url\":.*|\"integrations_rest_url\": \"\",|g" config.json
|
sed -i "s|\"default_is_url\":.*|\"default_is_url\": \"http://${MATRIX_ONION_DOMAIN_NAME}\",|g" $riot_config_file
|
||||||
sed -i "s|\"bug_report_endpoint_url\":.*|\"bug_report_endpoint_url\": \"http://${MATRIX_ONION_DOMAIN_NAME}/bugs\",|g" config.json
|
sed -i "s|\"bug_report_endpoint_url\":.*|\"bug_report_endpoint_url\": \"http://${MATRIX_ONION_DOMAIN_NAME}/bugs\",|g" $riot_config_file
|
||||||
sed -i "/\"servers\":/a \"${MATRIX_ONION_DOMAIN_NAME}\"," config.json
|
sed -i "/\"servers\":/a \"${MATRIX_ONION_DOMAIN_NAME}\"," $riot_config_file
|
||||||
fi
|
fi
|
||||||
|
sed -i "s|\"integrations_ui_url\":.*|\"integrations_ui_url\": \"\",|g" $riot_config_file
|
||||||
|
sed -i "s|\"integrations_rest_url\":.*|\"integrations_rest_url\": \"\",|g" $riot_config_file
|
||||||
|
sed -i 's|https://piwik.riot.im/||g' $riot_config_file
|
||||||
|
|
||||||
RIOT_ONION_HOSTNAME=$(add_onion_service riot 80 ${RIOT_ONION_PORT})
|
RIOT_ONION_HOSTNAME=$(add_onion_service riot 80 ${RIOT_ONION_PORT})
|
||||||
|
|
||||||
|
@ -347,9 +347,9 @@ function install_riot {
|
||||||
function_check add_ddns_domain
|
function_check add_ddns_domain
|
||||||
add_ddns_domain $RIOT_DOMAIN_NAME
|
add_ddns_domain $RIOT_DOMAIN_NAME
|
||||||
|
|
||||||
|
riot_remove_bad_links
|
||||||
chown -R www-data:www-data /var/www/$RIOT_DOMAIN_NAME/htdocs
|
chown -R www-data:www-data /var/www/$RIOT_DOMAIN_NAME/htdocs
|
||||||
|
|
||||||
riot_remove_bad_links
|
|
||||||
systemctl restart nginx
|
systemctl restart nginx
|
||||||
|
|
||||||
set_completion_param "riot domain" "$RIOT_DOMAIN_NAME"
|
set_completion_param "riot domain" "$RIOT_DOMAIN_NAME"
|
||||||
|
|
Loading…
Reference in New Issue