Script to get the version of Matrix Synapse

This commit is contained in:
DecaTec 2021-10-13 12:31:54 +02:00
parent 36b668d23a
commit 2080facee7
3 changed files with 19 additions and 1 deletions

17
GetMatrixSynapseVersion.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
#
# Gets the version of a Matrix Synapse installation
#
# The following variables have to be set individually.
serverDomain="matrix.mydomain.com"
echo "Getting version..."
echo ""
curlUrl="https://$serverDomain/_matrix/federation/v1/version"
version=$(curl -sS $curlUrl | grep '"version":' | sed -E 's/.*"([^"]+)".*/\1/')
echo "Matrix Synapse version: $version"
echo ""
echo "Done"
echo ""

View File

@ -6,5 +6,6 @@ Some useful scripts utilizing the API of Matrix Synapse in order to manage diffe
* `CleanupMedia.sh`: Deletes old local and remote media. * `CleanupMedia.sh`: Deletes old local and remote media.
* `DeactivateUser.sh`: Deactivates the given user. * `DeactivateUser.sh`: Deactivates the given user.
* `GetAccessToken.sh`: Gets the access token with curl. * `GetAccessToken.sh`: Gets the access token with curl.
* `ListAllUsers.sh`: Lists all users. * `GetAllUsers.sh`: Lists all users.
* `GetMatrixSynapseVersion.sh`: Gets the version of a Matrix Synapse instance.
* `UpdateRoomVersion.sh`: Updates a room to the given room version. * `UpdateRoomVersion.sh`: Updates a room to the given room version.