Add message archive management to prosody
This commit is contained in:
parent
c4c16b8d0d
commit
d51af9b3c4
|
@ -6934,10 +6934,37 @@ function install_tox_client {
|
||||||
echo 'install_tox_client' >> $COMPLETION_FILE
|
echo 'install_tox_client' >> $COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_prosody_modules {
|
||||||
|
if [ ! -d $INSTALL_DIR/prosody-modules ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
if [ ! -d /usr/lib/prosody ]; then
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $INSTALL_DIR/prosody-modules
|
||||||
|
hg pull
|
||||||
|
hg update
|
||||||
|
|
||||||
|
# support onion addresses
|
||||||
|
if [ -f $INSTALL_DIR/prosody-modules/mod_onions/mod_onions.lua ]; then
|
||||||
|
cp $INSTALL_DIR/prosody-modules/mod_onions/mod_onions.lua /usr/lib/prosody/modules/mod_onions.lua
|
||||||
|
fi
|
||||||
|
|
||||||
|
# message archive management
|
||||||
|
# https://modules.prosody.im/mod_mam.html
|
||||||
|
if [ -d cp $INSTALL_DIR/prosody-modules/mod_mam ]; then
|
||||||
|
cp $INSTALL_DIR/prosody-modules/mod_mam/*.lua /usr/lib/prosody/modules
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function install_xmpp {
|
function install_xmpp {
|
||||||
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
if [[ $SYSTEM_TYPE == "$VARIANT_WRITER" || $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CLOUD" || $SYSTEM_TYPE == "$VARIANT_SOCIAL" || $SYSTEM_TYPE == "$VARIANT_MEDIA" || $SYSTEM_TYPE == "$VARIANT_DEVELOPER" || $SYSTEM_TYPE == "$VARIANT_MESH" ]]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
update_prosody_modules
|
||||||
|
|
||||||
if grep -Fxq "install_xmpp" $COMPLETION_FILE; then
|
if grep -Fxq "install_xmpp" $COMPLETION_FILE; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
@ -6958,7 +6985,7 @@ function install_xmpp {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install the onions module
|
# install the onions module
|
||||||
cp $INSTALL_DIR/prosody-modules/mod_onions/mod_onions.lua /usr/lib/prosody/modules/mod_onions.lua
|
update_prosody_modules
|
||||||
if [ ! -f /usr/lib/prosody/modules/mod_onions.lua ]; then
|
if [ ! -f /usr/lib/prosody/modules/mod_onions.lua ]; then
|
||||||
echo $'mod_onions.lua could not be copied to the prosody modules directory'
|
echo $'mod_onions.lua could not be copied to the prosody modules directory'
|
||||||
exit 63952
|
exit 63952
|
||||||
|
@ -7001,6 +7028,7 @@ function install_xmpp {
|
||||||
echo ' "tls"; -- Enable mod_tls' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
echo ' "tls"; -- Enable mod_tls' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
||||||
echo ' "saslauth"; -- Enable mod_saslauth' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
echo ' "saslauth"; -- Enable mod_saslauth' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
||||||
echo ' "onions"; -- Enable chat via onion service' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
echo ' "onions"; -- Enable chat via onion service' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
||||||
|
echo ' "mam"; -- Message archive management' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
||||||
echo '}' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
echo '}' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
||||||
echo '' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
echo '' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
||||||
echo 'c2s_require_encryption = true' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
echo 'c2s_require_encryption = true' >> /etc/prosody/conf.avail/xmpp.cfg.lua
|
||||||
|
|
Loading…
Reference in New Issue