fix hotfix matrix, add wireguard clients

This commit is contained in:
2025-09-03 21:09:03 +10:00
parent bf9621fd69
commit 6193f3d4d4
5 changed files with 49 additions and 9 deletions

View File

@@ -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

30
hotfixmatrix.sh Normal file
View File

@@ -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"

View File

@@ -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

View File

@@ -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=

View File

@@ -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=