mirror of
https://github.com/SaraSmiseth/prosody.git
synced 2025-04-19 16:01:14 +00:00
Move remaining defaults from entrypoint script to cfg.lua files.
This commit is contained in:
parent
5d73416ac4
commit
6a269445d7
5 changed files with 24 additions and 25 deletions
|
@ -2,7 +2,10 @@ local stringy = require "stringy"
|
|||
|
||||
e2e_policy_chat = os.getenv("E2E_POLICY_CHAT") or "required"
|
||||
e2e_policy_muc = os.getenv("E2E_POLICY_MUC") or "required"
|
||||
e2e_policy_whitelist = stringy.split(os.getenv("E2E_POLICY_WHITELIST"), ", ")
|
||||
|
||||
local whitelist = os.getenv("E2E_POLICY_WHITELIST") or ""
|
||||
e2e_policy_whitelist = stringy.split(whitelist, ", ")
|
||||
|
||||
e2e_policy_message_optional_chat = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for conversations on this server."
|
||||
e2e_policy_message_required_chat = "For security reasons, OMEMO, OTR or PGP encryption is required for conversations on this server."
|
||||
e2e_policy_message_optional_muc = "For security reasons, OMEMO, OTR or PGP encryption is STRONGLY recommended for MUC on this server."
|
||||
|
|
|
@ -1,10 +1,18 @@
|
|||
local stringy = require "stringy"
|
||||
|
||||
local domain = os.getenv("DOMAIN")
|
||||
local abuse = os.getenv("SERVER_CONTACT_INFO_ABUSE") or "xmpp:abuse@" .. domain
|
||||
local admin = os.getenv("SERVER_CONTACT_INFO_ADMIN") or "xmpp:admin@" .. domain
|
||||
local feedback = os.getenv("SERVER_CONTACT_INFO_FEEDBACK") or "xmpp:feedback@" .. domain
|
||||
local sales = os.getenv("SERVER_CONTACT_INFO_SALES") or "xmpp:sales@" .. domain
|
||||
local security = os.getenv("SERVER_CONTACT_INFO_SECURITY") or "xmpp:security@" .. domain
|
||||
local support = os.getenv("SERVER_CONTACT_INFO_SUPPORT") or "xmpp:support@" .. domain
|
||||
|
||||
contact_info = {
|
||||
abuse = stringy.split(os.getenv("SERVER_CONTACT_INFO_ABUSE"), ", ");
|
||||
admin = stringy.split(os.getenv("SERVER_CONTACT_INFO_ADMIN"), ", ");
|
||||
feedback = stringy.split(os.getenv("SERVER_CONTACT_INFO_FEEDBACK"), ", ");
|
||||
sales = stringy.split(os.getenv("SERVER_CONTACT_INFO_SALES"), ", ");
|
||||
security = stringy.split(os.getenv("SERVER_CONTACT_INFO_SECURITY"), ", ");
|
||||
support = stringy.split(os.getenv("SERVER_CONTACT_INFO_SUPPORT"), ", ");
|
||||
abuse = stringy.split(abuse, ", ");
|
||||
admin = stringy.split(admin, ", ");
|
||||
feedback = stringy.split(feedback, ", ");
|
||||
sales = stringy.split(sales, ", ");
|
||||
security = stringy.split(security, ", ");
|
||||
support = stringy.split(support, ", ");
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
local domain = os.getenv("DOMAIN")
|
||||
local domain_http_upload = os.getenv("DOMAIN_HTTP_UPLOAD")
|
||||
local domain_muc = os.getenv("DOMAIN_MUC")
|
||||
local domain_proxy = os.getenv("DOMAIN_PROXY")
|
||||
local domain_pubsub = os.getenv("DOMAIN_PUBSUB")
|
||||
local domain_http_upload = os.getenv("DOMAIN_HTTP_UPLOAD") or "upload." .. domain
|
||||
local domain_muc = os.getenv("DOMAIN_MUC") or "conference." .. domain
|
||||
local domain_proxy = os.getenv("DOMAIN_PROXY") or "proxy." .. domain
|
||||
local domain_pubsub = os.getenv("DOMAIN_PUBSUB") or "pubsub." .. domain
|
||||
|
||||
-- XEP-0368: SRV records for XMPP over TLS
|
||||
-- https://compliance.conversations.im/test/xep0368/
|
||||
|
|
|
@ -1,19 +1,6 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
export DOMAIN_HTTP_UPLOAD=${DOMAIN_HTTP_UPLOAD:-"upload.$DOMAIN"}
|
||||
export DOMAIN_MUC=${DOMAIN_MUC:-"conference.$DOMAIN"}
|
||||
export DOMAIN_PROXY=${DOMAIN_PROXY:-"proxy.$DOMAIN"}
|
||||
export DOMAIN_PUBSUB=${DOMAIN_PUBSUB:-"pubsub.$DOMAIN"}
|
||||
export E2E_POLICY_WHITELIST=${E2E_POLICY_WHITELIST:-""}
|
||||
export SERVER_CONTACT_INFO_ABUSE=${SERVER_CONTACT_INFO_ABUSE:-"xmpp:abuse@$DOMAIN"}
|
||||
export SERVER_CONTACT_INFO_ADMIN=${SERVER_CONTACT_INFO_ADMIN:-"xmpp:admin@$DOMAIN"}
|
||||
export SERVER_CONTACT_INFO_FEEDBACK=${SERVER_CONTACT_INFO_FEEDBACK:-"xmpp:feedback@$DOMAIN"}
|
||||
export SERVER_CONTACT_INFO_SALES=${SERVER_CONTACT_INFO_SALES:-"xmpp:sales@$DOMAIN"}
|
||||
export SERVER_CONTACT_INFO_SECURITY=${SERVER_CONTACT_INFO_SECURITY:-"xmpp:security@$DOMAIN"}
|
||||
export SERVER_CONTACT_INFO_SUPPORT=${SERVER_CONTACT_INFO_SUPPORT:-"xmpp:support@$DOMAIN"}
|
||||
export PROSODY_ADMINS=${PROSODY_ADMINS:-""}
|
||||
|
||||
if [[ "$1" != "prosody" ]]; then
|
||||
exec prosodyctl $*
|
||||
exit 0;
|
||||
|
|
|
@ -3,7 +3,8 @@
|
|||
|
||||
local stringy = require "stringy"
|
||||
|
||||
admins = stringy.split(os.getenv("PROSODY_ADMINS"), ", ");
|
||||
local prosody_admins = os.getenv("PROSODY_ADMINS") or "";
|
||||
admins = stringy.split(prosody_admins, ", ");
|
||||
|
||||
pidfile = "/var/run/prosody/prosody.pid"
|
||||
|
||||
|
|
Loading…
Reference in a new issue