Browse Source

Ensure correct prosody binaries after upgrade

Bob Mottram 8 years ago
parent
commit
ba4db71e76
1 changed files with 12 additions and 6 deletions
  1. 12
    6
      src/freedombone-app-xmpp

+ 12
- 6
src/freedombone-app-xmpp View File

40
 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"'
40
 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"'
41
 XMPP_ECC_CURVE='"secp384r1"'
41
 XMPP_ECC_CURVE='"secp384r1"'
42
 
42
 
43
+prosody_latest_version='0.10'
44
+prosody_nightly=319
45
+prosody_nightly_hash='f1fdc8ce5b6f8bfa451d458616a0bbe5ed7c15881415e561586bab39bd705fa4'
46
+prosody_filename=prosody-${prosody_latest_version}-1nightly${prosody_nightly}
47
+
43
 xmpp_variables=(ONION_ONLY
48
 xmpp_variables=(ONION_ONLY
44
                 INSTALLED_WITHIN_DOCKER
49
                 INSTALLED_WITHIN_DOCKER
45
                 XMPP_CIPHERS
50
                 XMPP_CIPHERS
142
 function upgrade_xmpp {
147
 function upgrade_xmpp {
143
     function_check update_prosody_modules
148
     function_check update_prosody_modules
144
     update_prosody_modules
149
     update_prosody_modules
150
+
151
+    if [ -d ${INSTALL_DIR}/${prosody_filename} ]; then
152
+        # ensure that the binaries have not been overwritten
153
+        # by an operating system upgrade
154
+        cd ${INSTALL_DIR}/${prosody_filename}
155
+        make prefix=/usr install
156
+    fi
145
 }
157
 }
146
 
158
 
147
 function backup_local_xmpp {
159
 function backup_local_xmpp {
407
 }
419
 }
408
 
420
 
409
 function install_xmpp_nightly {
421
 function install_xmpp_nightly {
410
-    prosody_latest_version='0.10'
411
-    prosody_nightly=319
412
-    prosody_nightly_hash='f1fdc8ce5b6f8bfa451d458616a0bbe5ed7c15881415e561586bab39bd705fa4'
413
-
414
     if [ ! -d $INSTALL_DIR ]; then
422
     if [ ! -d $INSTALL_DIR ]; then
415
         mkdir -p $INSTALL_DIR
423
         mkdir -p $INSTALL_DIR
416
     fi
424
     fi
417
 
425
 
418
-    prosody_filename=prosody-${prosody_latest_version}-1nightly${prosody_nightly}
419
-
420
     cd $INSTALL_DIR
426
     cd $INSTALL_DIR
421
     wget https://prosody.im/nightly/${prosody_latest_version}/latest/${prosody_filename}.tar.gz
427
     wget https://prosody.im/nightly/${prosody_latest_version}/latest/${prosody_filename}.tar.gz
422
     if [ ! -f ${prosody_filename}.tar.gz ]; then
428
     if [ ! -f ${prosody_filename}.tar.gz ]; then