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

View file

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

View file

@ -1,15 +1,14 @@
#!/bin/bash #!/bin/bash
if [ $# -ne 1 ]; then if [ $# -ne 1 ]; then
echo "Usage: "$0" <username>" echo "Usage: "$0" <username>"
exit 1 exit 1
fi fi
docker run \ docker run \
-it \ -it \
--rm \ --rm \
--env-file={{ matrix_postgres_base_path }}/env-postgres-psql \ --env-file={{ matrix_postgres_base_path }}/env-postgres-psql \
--network {{ matrix_docker_network }} \ --network {{ matrix_docker_network }} \
{{ matrix_postgres_docker_image_to_use }} \ {{ 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 }}'" 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_hs_url": {{ matrix_riot_web_default_hs_url|to_json }},
"default_is_url": {{ matrix_riot_web_default_is_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_custom_urls": {{ matrix_riot_web_disable_custom_urls|to_json }},
"disable_guests": {{ matrix_riot_web_disable_guests|to_json }}, "disable_guests": {{ matrix_riot_web_disable_guests|to_json }},
"brand": "Riot", "brand": "Riot",
"integrations_ui_url": {{ matrix_riot_web_integrations_ui_url|to_json }}, "integrations_ui_url": {{ matrix_riot_web_integrations_ui_url|to_json }},
"integrations_rest_url": {{ matrix_riot_web_integrations_rest_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_widgets_urls": {{ matrix_riot_web_integrations_widgets_urls|to_json }},
"integrations_jitsi_widget_url": {{ matrix_riot_web_integrations_jitsi_widget_url|to_json }}, "integrations_jitsi_widget_url": {{ matrix_riot_web_integrations_jitsi_widget_url|to_json }},
"bug_report_endpoint_url": "https://riot.im/bugreports/submit", "bug_report_endpoint_url": "https://riot.im/bugreports/submit",
"enableLabs": true, "enableLabs": true,
"roomDirectory": { "roomDirectory": {
"servers": {{ matrix_riot_web_roomdir_servers|to_json }} "servers": {{ matrix_riot_web_roomdir_servers|to_json }}
}, },
"welcomeUserId": {{ matrix_riot_web_welcome_user_id|to_json }} "welcomeUserId": {{ matrix_riot_web_welcome_user_id|to_json }}
} }

View file

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
if [ $# -ne 3 ]; then if [ $# -ne 3 ]; then
echo "Usage: "$0" <username> <password> <admin access: 0 or 1>" echo "Usage: "$0" <username> <password> <admin access: 0 or 1>"
exit 1 exit 1
fi fi
user=$1 user=$1
@ -10,7 +10,7 @@ password=$2
admin=$3 admin=$3
if [ "$admin" -eq "1" ]; then 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 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 fi