From ba4db71e7604cf52fd2db8e2102158ae2d25f3b0 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 7 Dec 2016 09:16:38 +0000 Subject: [PATCH] Ensure correct prosody binaries after upgrade --- src/freedombone-app-xmpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/freedombone-app-xmpp b/src/freedombone-app-xmpp index 1797639f..30d944e1 100755 --- a/src/freedombone-app-xmpp +++ b/src/freedombone-app-xmpp @@ -40,6 +40,11 @@ XMPP_PASSWORD= XMPP_CIPHERS='"EDH+CAMELLIA:EDH+aRSA:EECDH+aRSA+AESGCM:EECDH+aRSA+SHA256:EECDH:+CAMELLIA128:+AES128:+SSLv3:!aNULL:!eNULL:!LOW:!3DES:!MD5:!EXP:!PSK:!DSS:!RC4:!SEED:!IDEA:!ECDSA:kEDH:CAMELLIA128-SHA:AES128-SHA"' XMPP_ECC_CURVE='"secp384r1"' +prosody_latest_version='0.10' +prosody_nightly=319 +prosody_nightly_hash='f1fdc8ce5b6f8bfa451d458616a0bbe5ed7c15881415e561586bab39bd705fa4' +prosody_filename=prosody-${prosody_latest_version}-1nightly${prosody_nightly} + xmpp_variables=(ONION_ONLY INSTALLED_WITHIN_DOCKER XMPP_CIPHERS @@ -142,6 +147,13 @@ function update_prosody_modules { function upgrade_xmpp { function_check update_prosody_modules update_prosody_modules + + if [ -d ${INSTALL_DIR}/${prosody_filename} ]; then + # ensure that the binaries have not been overwritten + # by an operating system upgrade + cd ${INSTALL_DIR}/${prosody_filename} + make prefix=/usr install + fi } function backup_local_xmpp { @@ -407,16 +419,10 @@ function xmpp_create_config { } function install_xmpp_nightly { - prosody_latest_version='0.10' - prosody_nightly=319 - prosody_nightly_hash='f1fdc8ce5b6f8bfa451d458616a0bbe5ed7c15881415e561586bab39bd705fa4' - if [ ! -d $INSTALL_DIR ]; then mkdir -p $INSTALL_DIR fi - prosody_filename=prosody-${prosody_latest_version}-1nightly${prosody_nightly} - cd $INSTALL_DIR wget https://prosody.im/nightly/${prosody_latest_version}/latest/${prosody_filename}.tar.gz if [ ! -f ${prosody_filename}.tar.gz ]; then