v1.3.2
This commit is contained in:
@@ -43,7 +43,13 @@ for ext in $exts; do
|
||||
# Skip this if the modules should not be added to modules_enabled.
|
||||
if [ "$ext" != "http_upload" ] && [ "$ext" != "vcard_muc" ] ; then
|
||||
echo " - enabling within ${config}"
|
||||
new_config=$(cat "${config}" | module="${ext}" perl -0pe 's/(mods_enabled[ ]*=[ ]*{[^}]*)};/$1\n\t"$ENV{module}";\n};/')
|
||||
new_config=$(cat "${config}" | module="${ext}" perl -0pe 's/(modules_enabled[ ]*=[ ]*{[^}]*)};/$1\n\t"$ENV{module}";\n};/')
|
||||
echo "${new_config}" > "${config}"
|
||||
fi
|
||||
# firewall module configuration
|
||||
if [ "$ext" == "firewall" ] ; then
|
||||
echo " - setting up mod_${ext}"
|
||||
new_config=$(cat "${config}" | echo -e "\nlocal spam_blocklist = os.getenv(\"SPAM_BLOCKLIST\") and \"/usr/local/etc/prosody/firewall/\" .. os.getenv(\"SPAM_BLOCKLIST\") or \"module:scripts/spam-blocklists.pfw\"\n\nfirewall_scripts = {\n\tspam_blocklist;\n};")
|
||||
echo "${new_config}" >> "${config}"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user