|
@@ -406,6 +406,47 @@ function xmpp_create_config {
|
406
|
406
|
echo 'max_history_messages = 10;' >> /etc/prosody/prosody.cfg.lua
|
407
|
407
|
}
|
408
|
408
|
|
|
409
|
+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
|
|
415
|
+ mkdir -p $INSTALL_DIR
|
|
416
|
+ fi
|
|
417
|
+
|
|
418
|
+ prosody_filename=prosody-${prosody_latest_version}-1nightly${prosody_nightly}
|
|
419
|
+
|
|
420
|
+ cd $INSTALL_DIR
|
|
421
|
+ wget https://prosody.im/nightly/${prosody_latest_version}/latest/${prosody_filename}.tar.gz
|
|
422
|
+ if [ ! -f ${prosody_filename}.tar.gz ]; then
|
|
423
|
+ echo $"Failed to download prosody nightly https://prosody.im/nightly/${prosody_latest_version}/latest/${prosody_filename}.tar.gz"
|
|
424
|
+ exit 78352
|
|
425
|
+ fi
|
|
426
|
+
|
|
427
|
+ hash_value=$(sha256sum ${prosody_filename}.tar.gz | awk -F ' ' '{print $1}')
|
|
428
|
+ if [[ "$hash_value" != "$prosody_nightly_hash" ]]; then
|
|
429
|
+ echo $'Unexpected hash value for prosody nightly download'
|
|
430
|
+ exit 68224283
|
|
431
|
+ fi
|
|
432
|
+
|
|
433
|
+ tar -xzvf ${prosody_filename}.tar.gz
|
|
434
|
+ cd ${prosody_filename}
|
|
435
|
+ ./configure --ostype=debian
|
|
436
|
+ make
|
|
437
|
+ make install
|
|
438
|
+ if [ ! -f /usr/local/bin/prosody ]; then
|
|
439
|
+ echo $'Failed to build prosody nightly'
|
|
440
|
+ rm ${prosody_filename}.tar.gz
|
|
441
|
+ rm -rf ${prosody_filename}
|
|
442
|
+ exit 628732
|
|
443
|
+ fi
|
|
444
|
+ cp /usr/local/bin/prosody* /usr/bin
|
|
445
|
+ rm /usr/local/bin/prosody*
|
|
446
|
+ rm ${prosody_filename}.tar.gz
|
|
447
|
+ rm -rf ${prosody_filename}
|
|
448
|
+}
|
|
449
|
+
|
409
|
450
|
function install_xmpp_main {
|
410
|
451
|
update_prosody_modules
|
411
|
452
|
|
|
@@ -624,6 +665,9 @@ function install_xmpp_main {
|
624
|
665
|
|
625
|
666
|
xmpp_create_config
|
626
|
667
|
|
|
668
|
+ # TODO comment this out after debian supports prosody 0.10 or later
|
|
669
|
+ install_xmpp_nightly
|
|
670
|
+
|
627
|
671
|
systemctl restart prosody
|
628
|
672
|
|
629
|
673
|
prosodyctl register $MY_USERNAME $DEFAULT_DOMAIN_NAME "$XMPP_PASSWORD"
|