2024-05-15 12:04:42 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2024-05-15 13:21:46 +02:00
|
|
|
export XDG_RUNTIME_DIR=/run/user/$UID
|
2024-05-15 12:04:42 +02:00
|
|
|
|
|
|
|
activate="$HOME/synapse/env/bin/activate"
|
2024-05-15 13:21:46 +02:00
|
|
|
domain=`ls $HOME/doms/`
|
2024-05-15 12:04:42 +02:00
|
|
|
|
|
|
|
if [ ! -f $activate ];
|
|
|
|
then
|
|
|
|
echo ">>> FATAL: Synapse env not detected. Stopping. Please adjust the script."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
source $activate
|
|
|
|
|
|
|
|
pip install --upgrade 'matrix-synapse[postgres]' pip
|
|
|
|
|
|
|
|
systemctl --user restart synapse
|
|
|
|
|
|
|
|
sleep 2
|
|
|
|
echo
|
|
|
|
echo ">>> Synapse has been restarted and"
|
|
|
|
echo ">>> is now reporting this version:"
|
2024-05-15 13:21:46 +02:00
|
|
|
curl -s "https://$domain/_synapse/admin/v1/server_version"|jq
|
2024-05-15 12:04:42 +02:00
|
|
|
echo
|
|
|
|
|
|
|
|
systemctl --user status synapse
|