Skip to content
Snippets Groups Projects
Commit 54fe76b9 authored by Bob Mottram's avatar Bob Mottram
Browse files

Architecture check for synapse

parent 42ade152
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,9 @@
VARIANTS='full full-vim chat'
IN_DEFAULT_INSTALL=1
SHOW_ON_ABOUT=0
IN_DEFAULT_INSTALL=0
SHOW_ON_ABOUT=1
SYNAPSE_REPO="https://github.com/matrix-org/synapse"
SYNAPSE_COMMIT='4a9055d4465d5d6059612e7c89f2b5774efc0e18'
SYNAPSE_PORT=8448
SYNAPSE_PASSWORD=
SYNAPSE_DIR=/etc/matrix-synapse
......@@ -44,6 +42,15 @@ synapse_variables=(ONION_ONLY
SYNAPSE_PASSWORD
DEFAULT_DOMAIN_NAME)
function can_install_synapse {
check_architecture=$(uname -a)
if [[ "$check_architecture" == *"amd64"* || "$check_architecture" == *"i386"* ]]; then
echo "1"
else
echo "0"
fi
}
function remove_user_synapse {
remove_username="$1"
# TODO
......@@ -149,6 +156,11 @@ function remove_synapse {
}
function install_synapse {
if [[ "$(can_install_synapse)" == "0" ]]; then
echo $'Matrix/Synapse can only be installed on i386 or amd64 architectures'
exit 36734
fi
if [[ ${ONION_ONLY} == 'no' ]]; then
# obtain a cert for the default domain
if [[ "$(cert_exists ${DEFAULT_DOMAIN_NAME} pem)" == "0" ]]; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment