Architecture check for synapse
This commit is contained in:
parent
42ade15281
commit
54fe76b9d3
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue