Set temp directory for matrix upgrades

This commit is contained in:
Bob Mottram 2018-05-23 12:43:25 +01:00
parent 92e44c6147
commit 7a6c52b487
1 changed files with 10 additions and 0 deletions

View File

@ -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"
@ -434,6 +439,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 {