This commit is contained in:
Bob Mottram 2018-05-23 13:04:58 +01:00
commit efd32577e5
1 changed files with 15 additions and 3 deletions

View File

@ -48,7 +48,7 @@ MATRIX_PORT=8009
MATRIX_FEDERATION_ONION_PORT=8111
MATRIX_ONION_PORT=8109
MATRIX_REPO="https://github.com/matrix-org/synapse"
MATRIX_COMMIT='ab5e888927e6a38190a65e10af7acf67873124e3'
MATRIX_COMMIT='9e8ab0a4f44a3ec9e4b049f5571c14e333e8f0fa'
REPORT_STATS="no"
MATRIX_SECRET=
MATRIX_EXPIRE_MONTHS=1
@ -418,6 +418,11 @@ function upgrade_matrix {
function_check set_repo_commit
set_repo_commit /etc/matrix "matrix commit" "$MATRIX_COMMIT" $MATRIX_REPO
cd /etc/matrix || exit 62476724
if [ ! -d /etc/matrix/tmp ]; then
mkdir /etc/matrix/tmp
fi
export TMPDIR=/etc/matrix/tmp
pip install --upgrade --process-dependency-links .
pip install --upgrade --force "pynacl>=1.2.1"
@ -426,7 +431,8 @@ function upgrade_matrix {
chown -R matrix:matrix /etc/matrix
chown -R matrix:matrix $MATRIX_DATA_DIR
pip install --upgrade --force "pynacl==0.3.0"
pip install --upgrade --force "pynacl>=1.2.1"
pip install --upgrade --force "canonicaljson>=1.1.3"
pip install --upgrade --force "phonenumbers>=8.2.0"
if [ -f /etc/ssl/certs/${MATRIX_DOMAIN_NAME}.dhparam ]; then
@ -434,6 +440,11 @@ function upgrade_matrix {
fi
systemctl start turn
systemctl start matrix
export TMPDIR=/tmp
if [ -d /etc/matrix/tmp ]; then
rm -rf /etc/matrix/tmp/*
fi
}
function backup_local_matrix {
@ -794,7 +805,8 @@ function install_matrix {
# wait for nginx to start otherwise user add fails later
sleep 5
pip install --upgrade --force "pynacl==0.3.0"
pip install --upgrade --force "pynacl>=1.2.1"
pip install --upgrade --force "canonicaljson>=1.1.3"
if [[ $(add_user_matrix "${MY_USERNAME}" "${MATRIX_PASSWORD}" | tail -n 1) != "0" ]]; then
echo $'Failed to add matrix admin user';