hs.scripts/updates/synapse.sh

27 lines
562 B
Bash

#!/bin/bash
set -e
export XDG_RUNTIME_DIR=/run/user/$UID
activate="$HOME/synapse/env/bin/activate"
domain=`ls $HOME/doms/`
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:"
curl -s "https://$domain/_synapse/admin/v1/server_version"|jq
echo
systemctl --user status synapse