Indent (non-YAML) using tabs

Fixes #83 (Github issue)
This commit is contained in:
Slavi Pantaleev 2019-01-26 09:37:26 +02:00
parent a88b24ed2c
commit 1a80058a2a
5 changed files with 54 additions and 55 deletions

View File

@ -1,8 +1,8 @@
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be executed as root! Aborting."
exit 1
echo "This script must be executed as root! Aborting."
exit 1
fi
echo "WARNING! You are about to remove everything the playbook installs for matrix.{{ host_specific_hostname_identity }}: matrix, docker images,..."
@ -10,25 +10,25 @@ echo -n "If you're sure you want to do this, type: 'Yes, I really want to remove
read sure
if [ "$sure" != "Yes, I really want to remove everything!" ]; then
echo "Good thing I asked, exiting"
exit 0
echo "Good thing I asked, exiting"
exit 0
else
echo "Stop and remove matrix services"
for s in $(find /etc/systemd/system/ -name "matrix-*" -printf "%f\n"); do
systemctl stop $s
rm -f /etc/systemd/system/$s
done
systemctl daemon-reload
echo "Remove matrix cronjobs"
find /etc/cron.d/ -name "matrix-*" -delete
echo "Remove matrix scripts"
find /usr/local/bin/ -name "matrix-*" -delete
echo "Remove every docker images"
docker rmi $(docker images -aq)
echo "Remove docker matrix network"
docker network rm matrix
echo "Remove /matrix directory"
rm -fr /matrix
exit 0
echo "Stop and remove matrix services"
for s in $(find /etc/systemd/system/ -name "matrix-*" -printf "%f\n"); do
systemctl stop $s
rm -f /etc/systemd/system/$s
done
systemctl daemon-reload
echo "Remove matrix cronjobs"
find /etc/cron.d/ -name "matrix-*" -delete
echo "Remove matrix scripts"
find /usr/local/bin/ -name "matrix-*" -delete
echo "Remove every docker images"
docker rmi $(docker images -aq)
echo "Remove docker matrix network"
docker network rm matrix
echo "Remove /matrix directory"
rm -fr /matrix
exit 0
fi

View File

@ -22,10 +22,10 @@ server {
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name {{ matrix_nginx_proxy_proxy_riot_hostname }};
server_name {{ matrix_nginx_proxy_proxy_riot_hostname }};
server_tokens off;
root /dev/null;
@ -39,7 +39,7 @@ server {
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
location / {
location / {
{% if matrix_nginx_proxy_enabled %}
{# Use the embedded DNS resolver in Docker containers to discover the service #}
resolver 127.0.0.11 valid=5s;
@ -52,5 +52,5 @@ server {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
}

View File

@ -1,15 +1,14 @@
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: "$0" <username>"
exit 1
echo "Usage: "$0" <username>"
exit 1
fi
docker run \
-it \
--rm \
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql \
--network {{ matrix_docker_network }} \
{{ matrix_postgres_docker_image_to_use }} \
psql -h {{ matrix_postgres_connection_hostname }} -c "UPDATE users set admin=1 WHERE name like '@$1:{{ host_specific_hostname_identity }}'"
-it \
--rm \
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql \
--network {{ matrix_docker_network }} \
{{ matrix_postgres_docker_image_to_use }} \
psql -h {{ matrix_postgres_connection_hostname }} -c "UPDATE users set admin=1 WHERE name like '@$1:{{ host_specific_hostname_identity }}'"

View File

@ -1,17 +1,17 @@
{
"default_hs_url": {{ matrix_riot_web_default_hs_url|to_json }},
"default_is_url": {{ matrix_riot_web_default_is_url|to_json }},
"disable_custom_urls": {{ matrix_riot_web_disable_custom_urls|to_json }},
"disable_guests": {{ matrix_riot_web_disable_guests|to_json }},
"brand": "Riot",
"integrations_ui_url": {{ matrix_riot_web_integrations_ui_url|to_json }},
"integrations_rest_url": {{ matrix_riot_web_integrations_rest_url|to_json }},
"integrations_widgets_urls": {{ matrix_riot_web_integrations_widgets_urls|to_json }},
"integrations_jitsi_widget_url": {{ matrix_riot_web_integrations_jitsi_widget_url|to_json }},
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"enableLabs": true,
"roomDirectory": {
"servers": {{ matrix_riot_web_roomdir_servers|to_json }}
},
"welcomeUserId": {{ matrix_riot_web_welcome_user_id|to_json }}
"default_hs_url": {{ matrix_riot_web_default_hs_url|to_json }},
"default_is_url": {{ matrix_riot_web_default_is_url|to_json }},
"disable_custom_urls": {{ matrix_riot_web_disable_custom_urls|to_json }},
"disable_guests": {{ matrix_riot_web_disable_guests|to_json }},
"brand": "Riot",
"integrations_ui_url": {{ matrix_riot_web_integrations_ui_url|to_json }},
"integrations_rest_url": {{ matrix_riot_web_integrations_rest_url|to_json }},
"integrations_widgets_urls": {{ matrix_riot_web_integrations_widgets_urls|to_json }},
"integrations_jitsi_widget_url": {{ matrix_riot_web_integrations_jitsi_widget_url|to_json }},
"bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"enableLabs": true,
"roomDirectory": {
"servers": {{ matrix_riot_web_roomdir_servers|to_json }}
},
"welcomeUserId": {{ matrix_riot_web_welcome_user_id|to_json }}
}

View File

@ -1,8 +1,8 @@
#!/bin/bash
if [ $# -ne 3 ]; then
echo "Usage: "$0" <username> <password> <admin access: 0 or 1>"
exit 1
echo "Usage: "$0" <username> <password> <admin access: 0 or 1>"
exit 1
fi
user=$1
@ -10,7 +10,7 @@ password=$2
admin=$3
if [ "$admin" -eq "1" ]; then
docker exec matrix-synapse register_new_matrix_user -u $user -p $password -c /data/homeserver.yaml --admin http://localhost:8008
docker exec matrix-synapse register_new_matrix_user -u $user -p $password -c /data/homeserver.yaml --admin http://localhost:8008
else
docker exec matrix-synapse register_new_matrix_user -u $user -p $password -c /data/homeserver.yaml --no-admin http://localhost:8008
docker exec matrix-synapse register_new_matrix_user -u $user -p $password -c /data/homeserver.yaml --no-admin http://localhost:8008
fi