diff --git a/costil-fast-fix-plz.sh b/costil-fast-fix-plz.sh deleted file mode 100644 index d369136..0000000 --- a/costil-fast-fix-plz.sh +++ /dev/null @@ -1,5 +0,0 @@ -1. fix synapse/data/homeserver.yaml -> media_store_path: /data/media_store -2. sudo docker exec -it matrix_synapse /bin/bash -3. chown -R 911:911 /media -4. mv data/media_store/ media/ -5. restore synapse/data/homeserver.yaml -> media_store_path: /media/media_store diff --git a/hotfixmatrix.sh b/hotfixmatrix.sh new file mode 100644 index 0000000..f1bcc82 --- /dev/null +++ b/hotfixmatrix.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -e + +FILE="/opt/docker/synapse/data/homeserver.yaml" +CONTAINER="matrix_synapse" + +### 1. Замена media_store_path +sed -i 's#media_store_path: /media/media_store#media_store_path: /data/media_store#g' "$FILE" + +### 2. Закомментировать ip_service_config_files блок +sed -i 's#^ip_service_config_files:#\#ip_service_config_files:#' "$FILE" +sed -i 's#^[[:space:]]\+- /briges/registration.yaml# \#- /briges/registration.yaml#' "$FILE" + +### 3. Вход и команды в контейнере +docker exec -i "$CONTAINER" /bin/bash <<'EOF' +chown -R 911:911 /media +mv data/media_store/ media/ +mkdir -p /briges +chown -R 911:911 /briges +EOF + +### 4. Перезапуск контейнера +docker restart "$CONTAINER" +sleep 5 + +### 5. Обратные изменения в файле +sed -i 's#media_store_path: /data/media_store#media_store_path: /media/media_store#g' "$FILE" +sed -i 's#^#ip_service_config_files:#ip_service_config_files:#' "$FILE" +sed -i 's#^ #- /briges/registration.yaml# - /briges/registration.yaml#' "$FILE" + diff --git a/inventory.ini b/inventory.ini index 08335ae..8a56605 100644 --- a/inventory.ini +++ b/inventory.ini @@ -1,2 +1,2 @@ [servers] -myserver ansible_host=192.168.1.208 ansible_user=ivan +myserver ansible_host=192.168.1.141 ansible_user=ivan diff --git a/roles/wireguard/files/golbal.conf b/roles/wireguard/files/golbal.conf new file mode 100644 index 0000000..cd370ec --- /dev/null +++ b/roles/wireguard/files/golbal.conf @@ -0,0 +1,13 @@ +#Client Global +[Interface] +PrivateKey = 0JbU1C+rJSj7PWXPABZy3+fRR0UU5Hf0lRy6BIE2Smg= +Address = 10.0.0.3/32 +DNS = 1.1.1.1, 1.0.0.1 +MTU = 1420 + +[Peer] +PublicKey = h31B3s731FwhWnbrnmDr4swVz25LuOJ3xAhhstH+sTg= +AllowedIPs = 10.0.0.0/24 +PersistentKeepalive = 25 +Endpoint = 192.168.1.116:48129 +PresharedKey = tajJo61lYJ6E/PvOktpVkL3spBGEeUp65yvye5Jx1Ys= diff --git a/roles/wireguard/files/wg0.conf b/roles/wireguard/files/wg0.conf index b36e99b..f3df49a 100644 --- a/roles/wireguard/files/wg0.conf +++ b/roles/wireguard/files/wg0.conf @@ -1,6 +1,7 @@ +#Client Global [Interface] -PrivateKey = 0JbU1C+rJSj7PWXPABZy3+fRR0UU5Hf0lRy6BIE2Smg= -Address = 10.0.0.3/32 +PrivateKey = ePf2nLSwYPjwqR3lyxPStEp0u53BV2XYoGLGCp5rVGs= +Address = 10.0.0.5/32 DNS = 1.1.1.1, 1.0.0.1 MTU = 1420 @@ -9,4 +10,5 @@ PublicKey = h31B3s731FwhWnbrnmDr4swVz25LuOJ3xAhhstH+sTg= AllowedIPs = 10.0.0.0/24 PersistentKeepalive = 25 Endpoint = 192.168.1.116:48129 -PresharedKey = tajJo61lYJ6E/PvOktpVkL3spBGEeUp65yvye5Jx1Ys= +PresharedKey = 8XtHcIBpakKgfmZQkty461X8fnq3eEqYuiafMvlRRU4= +