Parcourir la source

Ensure correct prosody binaries after upgrade

Bob Mottram il y a 8 ans
Parent
révision
ba4db71e76
1 fichiers modifiés avec 12 ajouts et 6 suppressions
  1. 12
    6
      src/freedombone-app-xmpp

+ 12
- 6
src/freedombone-app-xmpp Voir le fichier

@@ -40,6 +40,11 @@ XMPP_PASSWORD=
40 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 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 48
 xmpp_variables=(ONION_ONLY
44 49
                 INSTALLED_WITHIN_DOCKER
45 50
                 XMPP_CIPHERS
@@ -142,6 +147,13 @@ function update_prosody_modules {
142 147
 function upgrade_xmpp {
143 148
     function_check update_prosody_modules
144 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 159
 function backup_local_xmpp {
@@ -407,16 +419,10 @@ function xmpp_create_config {
407 419
 }
408 420
 
409 421
 function install_xmpp_nightly {
410
-    prosody_latest_version='0.10'
411
-    prosody_nightly=319
412
-    prosody_nightly_hash='f1fdc8ce5b6f8bfa451d458616a0bbe5ed7c15881415e561586bab39bd705fa4'
413
-
414 422
     if [ ! -d $INSTALL_DIR ]; then
415 423
         mkdir -p $INSTALL_DIR
416 424
     fi
417 425
 
418
-    prosody_filename=prosody-${prosody_latest_version}-1nightly${prosody_nightly}
419
-
420 426
     cd $INSTALL_DIR
421 427
     wget https://prosody.im/nightly/${prosody_latest_version}/latest/${prosody_filename}.tar.gz
422 428
     if [ ! -f ${prosody_filename}.tar.gz ]; then